This post may contain affiliate links. Please read our privacy policy.
Carrot cake bars feature a moist and flavorful carrot cake base packed with carrots, pineapple, and chopped nuts topped with tangy cream cheese frosting. These bars are simple to make and are perfect for feeding a crowd.

Remember when I shared my carrot cake bread and told you that I was really into carrot cake recipes this year?
Well, you know I couldn’t get through the rest of this spring season without sharing these carrot cake bars, too.
Bar desserts are great because they’re perfect for feeding a crowd. Sure, recipes like pumpkin bars, banana bars, and these carrot cake bars are pretty much sheet cakes with a different name, but they really are easier to cut and serve to a bunch of people.
Which makes this recipe absolutely perfect for taking to any parties you have coming up.
Why you’ll love these carrot cake bars
These carrot cake bars are SO good.
The base is a tender, moist carrot cake. The cake is perfectly spiced with cinnamon and just a hint of nutmeg and bursting with grated carrot, crushed pineapple, and chopped nuts.
The entire thing gets baked in a half sheet pan and finished with cream cheese frosting.
This recipe has all of the classic carrot cake flavors you love, but without any layering or fancy decorating. The bars are easy to cut as big or as small as you like, so you can easily feed just your family or a crowd with the same recipe.
Of course this is the perfect Easter dessert, but don’t count it out for Mother’s Day, Thanksgiving, Christmas, or just a random Thursday either.
How to make carrot cake bars
Carrot cake is one of my favorite cake recipes to make – since it’s usually an oil-based cake, the batter can be whisked together without needing to use a mixer! So easy.
Ingredients you’ll need
For these carrot cake bars, you will need:
- 4 eggs
- 1 cup granulated sugar
- ⅔ cup lightly packed light brown sugar
- 1 cup vegetable oil
- 2 teaspoons pure vanilla extract
- 2 cups all purpose flour
- 2 teaspoons baking powder
- 1 teaspoon baking soda
- 1 tablespoon cinnamon
- ¼ teaspoon ground nutmeg
- 1 teaspoon salt
- 2 cups peeled and grated carrots
- 8 ounces crushed pineapple, drained
- ⅔ cup chopped pecans or walnuts (optional)
Before you start baking, make sure you know how to measure flour correctly. This will help your bars turn out perfect every time.
A combination of granulated sugar and brown sugar give these bars a rich flavor. If you’re out of brown sugar, whip up a simple brown sugar substitute to use instead.
I also have several tips for softening brown sugar if yours hardened in the pantry.
I recommend peeling and grating your own carrots for this recipe. The bagged pre-shredded carrots from the store are usually too thick and will give these bars a weird texture.
Chopped pecans or walnuts add flavor and texture to these bars, but feel free to leave them out if you are allergic or don’t care for them.
The frosting for these bars is tweaked from my favorite cream cheese frosting recipe. For that, you will need:
- 12 ounces room-temperature cream cheese
- 6 tablespoons softened unsalted butter
- 1 1/2 teaspoon pure vanilla extract
- 3 cups confectioners’ sugar, sifted
Make sure the cream cheese and butter are both softened before you start mixing the frosting, otherwise it won’t come together very well.
If you forget to set either of these ingredients out ahead of time, I have a few tips for softening butter and softening cream cheese quickly.
If you’re out of powdered sugar, learn how to make a powdered sugar substitute to use.
Making this recipe
These carrot cake bars are baked in a half sheet pan, which measures 13×18 inches. Spray the pan with nonstick spray and line with a sheet of parchment paper.
In a large bowl, whisk together the eggs and both sugars. Once that mixture is well combined, whisk in the oil and vanilla.
In another mixing bowl, whisk together the dry ingredients: flour, baking soda, cinnamon, nutmeg, and salt. Stir this mixture into the wet ingredients until just combined.
Fold in the carrots, pineapple, and nuts, then spread the batter into the prepared pan.
Bake the bars at 350°F for 15-18 minutes; a toothpick inserted in the center will come out clean when the bars are done.
Let the carrot cake bars cool completely before adding the frosting.
To make the frosting, beat the cream cheese, butter, and vanilla with a mixer for about 3 minutes. Turn the speed to low and mix in the powdered sugar, then increase the speed again and mix another 2-3 minutes.
Spread the frosting evenly on top of the bars and enjoy!
Carrot cake bar storage
Store carrot cake bars in an airtight container in the refrigerator for up to 3 days. Let the bars come to room temperature before serving.
Leftover bars can also be frozen for up to a month. Slice, set them on a parchment-lined pan, and freeze for 1-2 hours until the frosting is solid.
Wrap the bars in a layer of plastic wrap and place them in a zip-top freezer bag before storing in the freezer.
Thaw the bars overnight in the refrigerator or for a couple of hours at room temperature.
Make-ahead tip
If you’re prepping for a holiday meal or party ahead of time and want to get these bars ready early, you totally can!
Make the bars as written and let them cool completely. Wrap the entire pan in 1-2 layers of plastic wrap followed by heavy-duty foil. Freeze for up to 2 months.
Make the frosting as written; store in an airtight container and freeze for the same amount of time.
When you’re ready to assemble the bars, let the frosting thaw in the fridge overnight and the cake thaw at room temperature for a couple of hours.
Bring the frosting to room temperature, then whip it with an electric mixer for a few minutes before spreading over the bars.
Frequently asked questions
The crushed pineapple in this recipe helps keep the bars moist and tender, so I don’t recommend omitting it. If you need a carrot cake recipe that does not use pineapple, try my carrot bundt cake or carrot cake cookies.
I usually use a box grater to grate my carrots. Make sure you peel the carrots first!
If using a box grater is not accessible for you, you can use the grater attachment on your food processor instead.
If you try to avoid vegetable oil and canola oil, substitute your preferred neutral-flavored oil, such as avocado oil.
Carrot Cake Bars
Ingredients
For the bars:
- 4 large eggs
- 1 cup granulated sugar
- ⅔ cup lightly packed light brown sugar
- 1 cup vegetable oil
- 2 teaspoons pure vanilla extract
- 2 cups all purpose flour
- 2 teaspoons baking powder
- 1 teaspoon baking soda
- 1 tablespoon cinnamon
- ¼ teaspoon ground nutmeg
- 1 teaspoon salt
- 2 cups peeled and grated carrots
- 8 ounces crushed pineapple drained
- ⅔ cup chopped pecans or walnuts optional
For the cream cheese frosting:
- 12 ounces cream cheese room temperature
- 6 tablespoons unsalted butter softened
- 1 ½ teaspoon pure vanilla extract
- 3 cups confectioners’ sugar sifted
Instructions
- Preheat oven to 350°F. Grease (1) half sheet pan (13×18 inches) with nonstick cooking spray and line with parchment paper. Set aside.
- In a large bowl, whisk together the eggs and sugars until well combined and smooth. Whisk in the oil and vanilla until well combined.
- In a separate bowl, whisk together the flour, baking soda, cinnamon, nutmeg, and salt. Add the dry ingredients to the wet ingredients and stir until just combined. Fold in the grated carrots, drained pineapple, and nuts (if using).
- Spread the batter into the prepared pan. Bake for 15-18 minutes, or until a toothpick inserted in the center comes out clean.
- Allow to cool completely before topping with the cream cheese frosting.
- When carrot cake bars are completely cool, prepare the cream cheese frosting. In the bowl of a stand mixer fitted with the paddle attachment or in a large bowl with an electric mixer, beat the cream cheese, butter and vanilla on medium-high speed for 3 minutes. Turn speed down to low and gradually add in confectioners’ sugar until incorporated. Turn speed back to medium-high speed and beat for an additional 2-3 minutes. Use an offset spatula to frost the carrot cake bars.
Notes
- Before you start baking, make sure you know how to measure flour correctly. This will help the bars turn out perfect every time.
- A combination of granulated sugar and brown sugar give these bars a rich flavor. If you’re out of brown sugar, whip up a simple brown sugar substitute to use instead. I also have several tips for softening brown sugar if yours hardened in the pantry.
- I recommend peeling and grating your own carrots for this recipe. The bagged pre-shredded carrots from the store are usually too thick and will give the bars a weird texture.
- Chopped pecans or walnuts add flavor and texture to these bars, but feel free to leave them out if you are allergic or don’t care for them.
Nutrition
Nutrition information is automatically calculated, so should only be used as an approximation.