Go Back
+ servings
Carrot Cake Bars Recipe

Carrot Cake Bars Recipe

These carrot cake bars are pure comfort in square form—soft, naturally spiced cake layers topped with tangy cream cheese frosting. I love pairing these with a strong cup of coffee in the morning or alongside a my favorite salad for a lighter dessert option that feels a little less indulgent. They're also perfect alongside afternoon tea or as a portable dessert for potlucks and gatherings.
No ratings yet
Print Pin Rate
Author: Lori Walker, MS, RD
Course: Soup
Cuisine: Mediterranean
Prep Time: 20 minutes
Cook Time: 40 minutes
Total Time: 1 hour
Servings: 9
Calories: 323kcal

Ingredients

For the Cake

  • 1 cup all-purpose flour spooned and leveled, never packed into the measuring cup
  • 1 cup shredded carrots about 2 medium carrots, loosely packed and not squeezed dry
  • ½ cup unsalted butter melted and slightly cooled to prevent cooking the egg
  • 1 large egg room temperature for better mixing
  • 1 teaspoon ground cinnamon freshly measured from a container purchased within the last 6 months
  • ¼ teaspoon baking powder ensures gentle rise without overmixing
  • 1 cup light brown sugar packed firmly to measure accurately
  • ¾ teaspoon pure vanilla extract not imitation, as it provides better flavor depth
  • ½ teaspoon ground nutmeg optional but recommended for warmth and depth
  • ¼ teaspoon fine sea salt balances sweetness and enhances spice flavors

For the Frosting

  • ¼ cup granulated sugar dissolved into the cream cheese for smooth texture
  • ½ teaspoon pure vanilla extract complements the tangy cream cheese perfectly
  • 4 ounce cream cheese left at room temperature for 15-20 minutes, cut into small pieces
  • 1 large egg yolk adds richness and helps create a stable frosting layer

Instructions

Step 1: Prepare Your Pan and Preheat the Oven

  • Start by preheating your oven to 350 degrees Fahrenheit. While it warms up, grab your 8x8-inch baking pan. I recommend lining it with parchment paper (letting the edges hang over the sides), then giving it a light spray of nonstick cooking spray. This two-step approach makes removal incredibly easy—you'll lift the entire cake out in one piece when cooled. If you don't have parchment paper, simply spray the pan generously with nonstick spray. The parchment just makes cleanup easier and prevents any sticking around the edges.
    Carrot Cake Bars Recipe step 1

Step 2: Combine Wet Ingredients for the Cake

  • Pour the melted butter into a medium mixing bowl. Add the packed brown sugar directly to the warm butter. Stir these together until the sugar dissolves and the mixture becomes smooth, about 1 minute. This ensures even sweetness throughout the cake. Crack your egg into a small cup first (to avoid shell pieces), then add it to the butter-sugar mixture. Pour in the vanilla extract. Whisk everything together vigorously for about 30 seconds until the mixture becomes pale and slightly fluffy. You should see tiny bubbles forming—this incorporates air and creates a lighter cake.
    Carrot Cake Bars Recipe step 2

Step 3: Mix the Dry Ingredients Together

  • In a separate bowl, whisk together the flour, cinnamon, baking powder, salt, and nutmeg. This step is important because it distributes the leavening agent and spices evenly without overmixing the batter later. Whisk for about 15-20 seconds until everything looks combined and you don't see any streaks of flour. This dry blend is what gives carrot cake its signature warmth—the cinnamon and nutmeg are non-negotiable if you want that classic flavor.
    Carrot Cake Bars Recipe step 3

Step 4: Create the Cake Batter

  • Pour the dry ingredient mixture into the wet ingredients. Using a rubber spatula or wooden spoon, fold together with about 12-15 gentle strokes until just combined. You want to see no more flour streaks, but don't overmix—a few small lumps are perfectly fine and create a more tender crumb. Overmixing develops gluten, which makes the cake tough rather than tender. This is the most common mistake I see home bakers make with bar recipes. Now fold in the shredded carrots with another 3-4 gentle strokes. The carrots should be distributed throughout, but don't squeeze or compress them. They'll release their moisture during baking, keeping everything moist.
    Carrot Cake Bars Recipe step 4

Step 5: Spread the Cake Batter

  • Pour the batter into your prepared 8x8 pan. Using an offset spatula or the back of a spoon, spread it evenly into the corners. The batter should reach about ½-inch thickness and look relatively level. This ensures even baking. Tap the pan gently on the counter a few times to release any air bubbles trapped in the batter. This prevents large holes from forming while baking.
    Carrot Cake Bars Recipe step 5

Step 6: Prepare the Frosting

  • While the cake bakes, make the frosting. Cut your room-temperature cream cheese into small pieces (about ½-inch cubes). Add them to a clean bowl along with the granulated sugar. Using a whisk or electric mixer on low speed, beat together for 1-2 minutes until the mixture becomes smooth and the sugar dissolves. The cream cheese should look like soft pudding at this point—it's easier to incorporate the egg yolk when it's this consistency. If your cream cheese was too cold, you'll see small lumps; let the mixture sit for 5 minutes and try again. Add the egg yolk and vanilla extract. Whisk gently for about 30 seconds until fully incorporated. The frosting should look pale, smooth, and slightly fluffy. Don't overmix here either—you want to avoid incorporating too much air, which can cause cracking.
    Carrot Cake Bars Recipe step 6

Step 7: Bake the Cake Layer

  • Place the pan in your preheated oven. Bake for 18-22 minutes. The cake is done when a toothpick inserted into the center comes out with just a few moist crumbs attached (not wet batter). The edges should look set and slightly pulled away from the pan sides, while the center still looks slightly underbaked—it continues cooking from residual heat. Your kitchen will smell absolutely incredible during this time. This is the good part of baking.
    Carrot Cake Bars Recipe step 7

Step 8: Spread the Frosting and Bake Again

  • Remove the pan from the oven and let it cool for just 2-3 minutes—it should still feel warm to the touch, but not hot. Using an offset spatula or butter knife, spread the frosting in an even layer over the warm cake. The warmth from the cake helps the frosting spread smoothly, and it'll set as everything cools. Return the pan to the oven and bake for another 8-10 minutes until the frosting is set but still slightly soft in the center. The frosting should look pale and set around the edges, but the very center can still have a tiny bit of jiggle—this keeps it creamy rather than rubbery.
    Carrot Cake Bars Recipe step 8

Step 9: Cool Completely Before Cutting

  • Remove the pan from the oven and set it on a cooling rack or folded kitchen towel. Let it cool at room temperature for at least 30 minutes, but ideally 1-2 hours. This cooling time is crucial—it allows the frosting to fully set so you get clean cuts instead of smeared frosting. For even cleaner cuts, refrigerate the cooled pan for at least 1 hour before slicing. A sharp knife dipped in hot water (then wiped dry) helps cut through the frosting cleanly too. Once cooled, use your parchment paper overhang to lift the entire cake out of the pan onto a cutting board. Cut into 16 bars (4 rows by 4 columns). Store any leftovers in an airtight container.
    Carrot Cake Bars Recipe step 9

Notes

- Shred Fresh Carrots Right Before Baking - If you shred carrots ahead of time, they oxidize and lose some nutrients and moisture. Shred them just before mixing the batter for maximum freshness and texture.
- Don't Squeeze the Shredded Carrots - This is a critical step. The moisture in carrots is what keeps this cake tender. Let them sit loosely in your measuring cup.
- Room Temperature Cream Cheese is Non-Negotiable - Cold cream cheese creates lumps and won't spread smoothly. Remove it from the fridge 15-20 minutes before you start the frosting. Your kitchen temperature matters too—if it's very cold, let it sit even longer.
- Use an Offset Spatula for Easy Frosting Spread - These angled spatulas cost about five dollars and make frosting spread infinitely easier. It's one of my favorite small kitchen investments.
- Invest in Quality Cinnamon - Stale cinnamon tastes dusty and flat. Buy it from a store with good turnover (not that dusty container from three years ago), and replace it every 6 months for the best flavor.
- Dip Your Knife in Hot Water Between Cuts - This prevents the frosting from sticking to your knife. Keep a tall glass of hot water nearby, dip your knife, wipe it dry with a clean towel, then cut. Repeat for each cut.