Moist Carrot Cake Bars with Cream Cheese Frosting
These carrot cake bars all the spiced warmth of the classic layer cake in a single pan. A tangy cream cheese frosting on top keeps the whole thing simple and quick enough for any day that calls for a treat.

They bake up with a soft crumb and just the right amount of cinnamon and nutmeg. No stacking, no crumbs to hide, just a slab of tender cake cut into squares.
Why This One Stays in the Rotation
I like that this recipe skips the fuss of a layer cake but still gives me that same cozy flavor. The bars stay incredibly moist from the oil and fresh carrots, and the cream cheese frosting sets up without turning cloying.
The whole pan cools fast, so you are never waiting long to cut into it. It is the dessert I turn to when I want something reliable, not precious.
Ingredients

- 2 cups (250 g) all-purpose flour: spooned and leveled so the bars stay tender
- 1 tsp baking powder
- 1 tsp baking soda
- ½ tsp salt
- 2 tsp ground cinnamon
- ½ tsp ground nutmeg
- ¼ tsp ground ginger: optional, but it adds a gentle background warmth
- 3 large eggs: at room temperature
- 1 cup (200 g) granulated sugar
- ½ cup (100 g) packed light brown sugar
- ¾ cup (180 ml) vegetable oil: canola or melted coconut oil both work
- 2 tsp vanilla extract
- 2 cups (200 g) finely grated carrots: about 3 medium carrots, packed lightly
- ½ cup (60 g) chopped walnuts or pecans: optional, for crunch
- For the frosting
- 8 oz (226 g) cream cheese, softened: full fat gives the silkiest result
- ¼ cup (56 g) unsalted butter, softened
- 2 cups (240 g) powdered sugar
- 1 tsp vanilla extract
Variations and Substitutions
- Skip the nuts: leave them out or swap in sunflower seeds for a nut-free bar.
- Add pineapple: fold ¼ cup crushed pineapple, well drained, into the batter for extra moisture.
- Use whole wheat pastry flour: swap up to half the all-purpose flour for a slightly nuttier crumb.
- Dairy-free: use vegan cream cheese and plant-based butter for the frosting.
For a classic layer cake, try my Spiced Carrot Cake with Maple Cream Cheese Frosting.
How to Make Carrot Cake Bars
Step 1: Mix the Wet Ingredients

Preheat the oven to 350°F (175°C) and line a 9×13-inch baking pan with parchment, letting the edges hang over the sides. In a large bowl, whisk the 3 eggs, 1 cup granulated sugar, ½ cup brown sugar, ¾ cup oil, and 2 teaspoons vanilla until the mixture looks glossy and thickened, about 1 minute.
You are fully incorporating the sugars here, which helps create a fine crumb later. The oil keeps everything moist, so no stand mixer is needed.
Step 2: Fold in the Dry Ingredients and Carrots

In a separate bowl, whisk the 2 cups flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger. Pour the dry mixture over the wet and stir with a spatula just until a few streaks of flour remain. Then add the 2 cups grated carrots and nuts, if using, and fold until no white patches show.
The batter will be thick and speckled with orange. Stop as soon as the flour disappears to keep the bars light.
Step 3: Bake the Bars

Scrape the batter into the prepared pan and spread it evenly. Bake on the middle rack for 25 to 30 minutes, until the top springs back lightly when pressed and a toothpick inserted in the center comes out clean.
The edges will pull slightly from the pan and the kitchen will smell like toasted cinnamon. Let the cake cool completely in the pan set on a wire rack before you add any frosting.
Step 4: Whip the Cream Cheese Frosting

While the bars cool, beat the 8 oz cream cheese and ¼ cup butter in a large bowl with a hand mixer on medium speed until smooth and no lumps remain, about 2 minutes. Sift in the 2 cups powdered sugar, add the 1 teaspoon vanilla, and beat on low until combined, then increase speed to medium and beat until fluffy, about 1 minute more.
The frosting should hold soft peaks and spread easily. If it feels loose, chill it for 10 minutes; if it seems stiff, beat in a teaspoon of milk.
Step 5: Frost and Slice

Once the cake is completely cool, lift it out of the pan using the parchment. Dollop the frosting on top and spread it to the edges with an offset spatula or the back of a spoon. Slice into 12 squares and serve.
The frosting will look smooth and white against the amber cake. These bars keep their neat shape as you lift them onto a plate.
Tips for Tender Carrot Cake Bars
- Grate the carrots on the finest holes of a box grater. Pre-shredded carrots are too dry and will not soften properly.
- Do not overmix after you add the flour. A few small lumps in the batter is better than a tough bar.
- Make sure the cake is fully cool before you frost it. Any residual warmth will melt the cream cheese frosting into a puddle.
- For the cleanest slices, chill the whole frosted pan for 20 minutes before cutting.
Bake times by pan size:
| Pan Size | Bake Time | Result |
|---|---|---|
| 9×13-inch | 25–30 min | Thinner, soft bars |
| 8×8-inch | 35–40 min | Thicker, cake-like bars |
Keeping Bars Fresh
Refrigerate the frosted bars in an airtight container for up to 5 days. They soften a bit as they sit, and many people prefer them straight from the fridge.
Serve cold: the frosting firms up into an almost fudge-like layer. Let them sit at room temperature for 10 minutes if you want a fluffier bite.
Frequently Asked Questions
Can I freeze these carrot cake bars?
Yes. Freeze the unfrosted cake, tightly wrapped, for up to 2 months. Thaw it in the fridge overnight, then make the frosting fresh.
Do I have to peel the carrots?
Yes. Peeling removes the bitter outer layer and keeps the texture smooth. Unpeeled carrots can taste earthy and will have flecks of skin in the batter.
Why did my bars sink in the middle?
That usually means they were underbaked or the oven door was opened too early. Test the center with a toothpick before pulling them, and if it still has batter on it, give it another 3 to 5 minutes.
Can I use a different oil?
You can. Melted coconut oil works but will add a subtle coconut flavor. A neutral oil like avocado or canola is best if you want the spices to stand out.

Carrot Cake Bars Recipe
Ingredients
Method
- Preheat the oven to 350°F (175°C) and line a 9×13-inch baking pan with parchment.
- In a large bowl, whisk together the eggs, both sugars, oil, and vanilla until smooth and glossy.
- In a separate bowl, whisk the flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
- Stir the dry ingredients into the wet mixture just until combined, then fold in the grated carrots and nuts.
- Spread the batter into the prepared pan and bake for 25 to 30 minutes, until a toothpick inserted in the center comes out clean. Cool completely.
- Beat the cream cheese and butter together until smooth, then gradually beat in the powdered sugar and vanilla until fluffy.
- Frost the cooled cake, slice into 12 bars, and serve.
