Moist Dairy-Free Carrot Cake with Tangy Cream Cheese Frosting
This dairy‑free carrot cake is the kind of dessert that disappears fast, even around people who swear they like the “real” version. It bakes up tender and full of spice, with a crumb that stays soft for days.

The frosting is what seals the deal. You get that same tangy cream cheese bite thanks to a good dairy‑free alternative and a little lemon, so nobody feels left out at the table.
Why This Carrot Cake Works
The oil and crushed pineapple do all the heavy lifting that butter usually handles. That means the cake stays moist and never dries out, even after a night in the fridge.
The spice blend is warm but not overpowering. Cinnamon, a whisper of nutmeg, and fresh orange zest bring the carrots forward instead of burying them.
Ingredients

- 2 cups all‑purpose flour: spooned and leveled, not scooped
- 1 ½ tsp baking powder
- 1 tsp baking soda
- ½ tsp salt
- 2 tsp ground cinnamon
- ¼ tsp ground nutmeg
- ¼ tsp ground ginger: optional, for extra warmth
- 1 cup granulated sugar
- ½ cup packed light brown sugar
- 3 large eggs, at room temperature
- ¾ cup neutral oil: vegetable, canola, or light olive oil
- 2 tsp vanilla extract
- 2 cups finely grated carrots: from about 3 medium carrots, peeled
- 1 cup well‑drained crushed pineapple: squeeze out the juice using a clean towel
- ½ cup chopped walnuts: plus more for topping (optional)
- 1 cup dairy‑free cream cheese: from a tub, not a block, at room temperature
- ¼ cup dairy‑free butter: the stick kind works best for frosting
- 3 cups powdered sugar: sifted
- 1 tsp lemon juice
- 1 tsp vanilla extract
- Pinch of salt
Variations / Substitutions
- Walnuts: swap in pecans, or leave them out for a nut‑free cake. Toast the nuts first for a deeper flavor.
- Raisins: add ½ cup of golden raisins with the carrots if you like a little chew.
- Gluten‑free: use a 1‑to‑1 gluten‑free flour blend that contains xanthan gum.
- Pineapple: unsweetened applesauce works in a pinch, but the cake will be slightly less moist.
Try pairing the same cream cheese frosting with a classic Banana Layer Cake.
How To Make Dairy‑Free Carrot Cake
Step 1: Sift the Dry Ingredients

Preheat the oven to 350°F (175°C) with a rack in the middle. Grease two 8‑inch round cake pans and line the bottoms with parchment paper.
Sift the 2 cups flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger (if using) into a large bowl. Whisk the mixture for about 30 seconds to distribute everything evenly. This step keeps you from biting into a pocket of baking soda later.
Step 2: Whisk the Wet Ingredients

In a separate large bowl, whisk the granulated sugar, brown sugar, and ¾ cup oil until the mixture looks like wet sand and there are no dry sugar clumps, about 1 minute. Crack in the 3 eggs one at a time, whisking well after each. Stir in the 2 teaspoons of vanilla.
The mixture will be smooth and slightly thickened. If the eggs are cold, the batter might look a little curdled at first, but it will come together as you keep whisking.
Step 3: Mix the Batter

Pour the wet mixture into the dry ingredients. Stir with a rubber spatula just until the flour disappears and you no longer see white streaks. Do not overmix, or the cake can turn dense and tough.
Now fold in the 2 cups grated carrots, the 1 cup squeezed‑dry crushed pineapple, and the ½ cup walnuts (if using). The batter will be thick and speckled with orange and golden bits. Stop as soon as the carrots are evenly distributed.
Step 4: Bake the Layers

Divide the batter equally between the prepared pans and smooth the tops with the back of a spoon. Tap each pan gently on the counter to release any big air bubbles.
Bake for 25 to 30 minutes, until the centers spring back when lightly pressed and a toothpick inserted in the middle comes out clean. The edges will just be pulling away from the sides of the pan. Cool the cakes in the pans for 10 minutes, then turn them out onto a wire rack to cool completely before frosting.
Step 5: Whip the Frosting

While the cake cools, beat the 1 cup dairy‑free cream cheese and ¼ cup dairy‑free butter together with a hand mixer on medium speed until smooth and lump‑free, about 2 minutes.
With the mixer on low, gradually add the 3 cups powdered sugar, the lemon juice, vanilla, and a pinch of salt. Once the sugar is incorporated, increase the speed to high and beat for another minute until the frosting is light and fluffy. If it feels too soft, pop it in the fridge for 15 minutes to firm up.
Step 6: Frost the Cake

Place one completely cooled cake layer on a serving plate. Spread a generous dollop of frosting over the top, then place the second layer on top, flat side up.
Frost the top and sides of the whole cake with the remaining frosting, using an offset spatula to swirl the surface. Scatter a handful of chopped walnuts over the top if you like a little crunch. Slice and serve right away, or let the cake sit for 30 minutes so the frosting sets slightly.
Tips for a Great Dairy‑Free Carrot Cake
- Grate your own carrots: The pre‑shredded kind is too dry and thick to soften properly during baking.
- Drain the pineapple well: Even a little extra liquid can sink the center of the cake. Press it firmly in a clean kitchen towel.
- Cool completely before frosting: A warm cake will melt the dairy‑free butter in the frosting and turn it into a soupy mess.
- Room temperature frosting ingredients: Cold cream cheese or butter will stay lumpy no matter how long you beat it.
Bake times for common pan sizes:
| Pan size and type | Bake time at 350°F |
|---|---|
| Two 8‑inch round pans | 25 to 30 minutes |
| Two 9‑inch round pans | 22 to 27 minutes |
| One 9×13‑inch rectangular pan | 35 to 40 minutes |
Storing Leftover Cake
Because of the dairy‑free cream cheese frosting, store the cake in an airtight container in the refrigerator. It keeps well for up to 5 days. Let slices sit at room temperature for about 20 minutes before serving, so the frosting softens and the crumb returns to its tender texture.
Frequently Asked Questions
Can I make this cake gluten‑free?
Yes. Replace the all‑purpose flour with an equal weight of a 1‑to‑1 gluten‑free flour blend that contains xanthan gum. The texture will be slightly more delicate but still moist.
What oil works best?
Any neutral‑tasting oil like vegetable, canola, or grapeseed works perfectly. Avoid strong‑flavored olive oil unless you want that to come through.
Can I bake this as cupcakes?
Yes, divide the batter into a lined 12‑cup muffin tin and bake at 350°F for 18 to 22 minutes. Let them cool completely before frosting.
Why did my frosting turn out grainy?
Gritty frosting usually means the dairy‑free cream cheese or butter was still cold, or the powdered sugar was not sifted. Make sure everything is at true room temperature and beat until completely smooth.

Ingredients
Method
- Preheat oven to 350°F. Grease two 8‑inch pans and line with parchment.
- Sift flour, baking powder, baking soda, salt, and spices into a bowl; whisk.
- In a separate bowl, whisk sugars and oil until sandy, then beat in eggs one at a time, then vanilla.
- Pour wet into dry, stir until just combined, then fold in carrots, pineapple, and walnuts.
- Divide batter into pans and bake 25 to 30 minutes until a toothpick comes out clean. Cool 10 minutes in pans, then transfer to a rack to cool completely.
- Beat dairy‑free cream cheese and butter until smooth, then gradually add powdered sugar, lemon juice, vanilla, and salt; whip until fluffy.
- Frost cooled cake layers, stacking them. Top with extra walnuts if desired.
