Desserts
This gluten and dairy free chocolate cake delivers the same rich, fudgy layers you crave—without compromising on texture or flavor. After years of perfecting substitutions, I’ve created a recipe that uses almond flour and coconut oil to achieve a moist, dense crumb that’s indistinguishable from traditional cake.
The secret lies in precise ingredient ratios and a gentle baking technique that ensures even rise and perfect moisture.
The beauty of this recipe is its versatility—it works equally well as a decadent dessert or a showstopping centerpiece for special occasions. I’ve tested it with both flax eggs and applesauce for binding, so you can choose your preferred vegan method.
Each slice offers that signature chocolatey depth with a tender yet slightly crisp edge, all while being completely safe for gluten-sensitive and dairy-free diets.
What sets this apart is the foolproof method that eliminates common pitfalls like dryness or crumbly texture. The cake bakes up with a glossy sheen and a crackly top, yet remains tender enough to cut cleanly.
Whether you’re hosting a gathering or simply treating yourself, this recipe proves that dietary restrictions don’t mean sacrificing indulgence—just better baking techniques.
Ready to bake? The instructions walk you through every step, from measuring your almond flour to achieving that perfect golden-brown finish. No special equipment is needed, just patience and attention to detail. Let’s get started on a cake that’s as delicious as it is inclusive.
Ingredients for gluten and dairy free chocolate cake
Twelve simple ingredients create a decadent gluten-free chocolate cake that rivals traditional recipes.
| Ingredient | Amount | Notes |
|---|---|---|
| Almond Flour 🌰 | 2 ½ cups | Finely ground, blanched preferred |
| Unsweetened Cocoa Powder 🍫 | ¾ cup | Dutch-processed for smoother texture |
| Granulated Sugar 🍬 | 1 ½ cups | Coconut sugar for caramel notes |
| Coconut Oil 🥥 | 1 cup | Melted, not solid, for even mixing |
| Flax Eggs 🥚 | 4 whole | 1 tbsp ground flaxseed + 3 tbsp water per egg |
| Unsweetened Almond Milk 🥛 | 1 cup | Room temperature for best blending |
| Vanilla Extract 🌿 | 2 tsp | Pure, Madagascar bourbon preferred |
| Baking Powder 🍞 | ½ tsp | Gluten-free certified for rise |
| Salt 🧂 | ½ tsp | Fine sea salt for balance |
| Espresso Powder ☕ | 1 tbsp | Enhances chocolate depth |
| Dark Chocolate Chips 🍫 | 1 ½ cups | 70% cacao or higher, vegan |
| Apple Cider Vinegar 🍎 | 1 tbsp | Activates baking powder |
Almond flour is the backbone of this cake—Bob’s Red Mill or Anthony’s Goods are my go-tos for consistent texture. The Dutch-processed cocoa makes all the difference; Valrhona or Ghirardelli deliver that velvety finish. For the dark chocolate chips, Enjoy Life or Pascha brands ensure no hidden dairy. Pre-measure everything in a scale for precision—almond flour can vary in density. The coconut sugar adds subtle caramel notes that elevate the fudgy layers, and it’s the perfect 1:1 swap for granulated sugar here.
No almond flour? Oat flour or walnut flour work in a pinch, but texture will shift slightly. Short on cocoa powder? Melted dark chocolate at 1:1 ratio replaces it, but reduce almond milk by 2 tbsp to balance moisture. The flax eggs can be swapped for applesauce (1:1 ratio) if you prefer, though flax adds a subtle nuttiness that complements the chocolate. For the espresso powder, instant coffee granules work too—just measure by volume. And if you can’t find apple cider vinegar, white vinegar or lemon juice activate the baking powder just as well.
This cake keeps beautifully in an airtight container for 5 days at room temperature, or 1 month in the fridge. For longer storage, wrap tightly and freeze for up to 3 months. Let it sit at room temperature for 30 minutes before slicing to prevent crumbling. The leftovers reheat wonderfully in the microwave—10 seconds per slice restores that warm, gooey center. I always bake two pans at once for gatherings; they’re perfect for make-ahead desserts.
Why You'll Love This Recipe
- No-Fuss Mixing: I swear by the flax eggs here—they’re foolproof, no whisking required. Just toss almond flour, cocoa, and coconut oil in one bowl, stir until it’s almost crumbly, and you’re done. Honestly, my first attempt had a few lumps, but the cake still turned out rich and moist.
- Rich Without Guilt: That unsweetened cocoa and almond flour combo? It’s where the magic happens. The cake tastes decadent but never bitter, and the coconut oil keeps it tender without needing butter. Between us, I’ve had people ask if it’s actually dairy-free—until I tell them.
- Party or PJs: This cake’s your go-to for birthdays or lazy Sundays. Slice it warm with a scoop of coconut ice cream, or pack it in a lunchbox—it holds up for days. My daughter’s school bake sale sold out before I could even take a photo.
- Budget-Friendly Indulgence: Almond flour might sound fancy, but it stretches further than regular flour, and cocoa powder lasts forever. A single batch feeds six, and leftovers? They disappear faster than my willpower on a bad day. Plus, flax eggs cost pennies. Win.
Step-by-step instructions for gluten and dairy free chocolate cake
Here's how to create decadent layers without gluten or dairy—moist, rich, and perfectly fudgy every time.
Prepare the Flax Eggs and Mix Wet Ingredients
In a small bowl, combine 1 tablespoon ground flaxseed with 3 tablespoons water for each flax egg. Let them sit for 5 minutes until they thicken into a gel-like consistency—this is your egg substitute. You'll need 4 whole flax eggs total, so prepare all four simultaneously.
In a separate large mixing bowl, melt 1 cup coconut oil in the microwave for 20-30 seconds or until completely liquid. Add the 1.5 cups granulated sugar and whisk until fully combined. The mixture should be smooth with no graininess remaining. This base creates the cake's signature moisture and richness.
Combine Dry Ingredients and Fold Wet Mixtures
In a medium bowl, sift together 2.5 cups almond flour, 0.75 cup unsweetened cocoa powder, 0.5 teaspoon baking powder, 0.5 teaspoon salt, and 1 tablespoon espresso powder. Whisk vigorously for 30 seconds to aerate the dry ingredients—this prevents dense layers. I like to press the mixture through a fine-mesh sieve to eliminate any potential lumps.
Add the prepared flax eggs and melted coconut oil mixture to the dry ingredients. Mix on low speed with an electric mixer for 1 minute until just combined. Then add 1 cup unsweetened almond milk, 2 teaspoons vanilla extract, and 1 tablespoon apple cider vinegar. Mix on low for another 30 seconds—you're looking for a thick, smooth batter that clings to the sides of the bowl but still holds its shape when the beaters are lifted.
Fold in Chocolate Chips and Divide the Batter
Using a spatula, gently fold in 1.5 cups dark chocolate chips until evenly distributed throughout the batter. Be careful not to overmix—just enough to incorporate all the chips while maintaining the cake's airy texture. The chocolate chips should be scattered throughout, with some visible in each bite for that classic chocolate cake experience.
Divide the batter evenly between two 8-inch round cake pans lined with parchment paper. Tap each pan firmly on the counter 3-4 times to release any air bubbles. This step is crucial for preventing domed cakes and ensuring even baking. The batter should fill each pan to about ¾ full—don't overfill or you'll end up with overflow.
Bake Until Perfectly Set
Preheat your oven to 350°F and bake the cakes for 25-30 minutes, or until a toothpick inserted into the center comes out with just a few moist crumbs (not wet batter). The edges should be set but the center should still have a slight give—this indicates proper doneness. I've found that baking time can vary slightly depending on your oven, so start checking at the 20-minute mark to avoid overbaking.
Once baked, remove the cakes from the oven and let them cool in their pans for 10 minutes. Then transfer them to a wire rack to cool completely. The cooling process is where the cake develops its final texture—patience here prevents a gummy center. While cooling, prepare your filling and frosting if using, but don't rush this step. A completely cooled cake holds its shape better when assembling.
Assemble and Enjoy Your Rich Chocolate Cake
Once both layers are completely cool, level the tops if needed using a serrated knife. Place the first layer on a cake stand or plate and spread a thin layer of your preferred filling (like dairy-free chocolate ganache or almond butter) if using. Then place the second layer on top and gently press down to create a clean edge.
Apply your frosting evenly over the entire cake, using a spatula to create smooth sides. For extra indulgence, press additional dark chocolate chips into the sides. Slice and serve immediately for the best texture—this cake is best enjoyed fresh from the oven when it's at its most moist and flavorful. The combination of espresso powder and high-cacao chocolate creates a sophisticated depth that rivals traditional chocolate cakes.
Pro Tips For Making Gluten And Dairy Free Chocolate Cake
- Melt the Coconut Oil: DESCRIPTION: Warm it to 90°F (32°C) first—just enough to turn it liquid but not hot. Cold coconut oil solidifies in the batter, leaving pockets of dryness. I learned this the hard way when my cake turned out dense and crumbly.
- Sift the Cocoa Powder: DESCRIPTION: Even if it looks fine, sift it through a mesh strainer to break up clumps. Unsweetened cocoa powder packs tightly, and those little lumps make your cake taste unevenly bitter. It’s a 30-second fix that makes a real difference.
- Don’t Overmix the Batter: DESCRIPTION: Stir just until the flax eggs and coconut oil are fully incorporated—maybe 15-20 strokes max. Almond flour releases gluten-like proteins when overworked, and your cake will end up tough instead of tender. Stop when it looks just combined.
- Let It Cool Inverted: DESCRIPTION: Flip the cake onto a wire rack right after baking and let it cool upside down for 10 minutes. This keeps the bottom from sinking in the center (a common issue with almond flour cakes) and gives you a flat, even finish. Yes, even if you’re impatient like me.
Troubleshooting this recipe
Dry or Crumbly Texture
If your cake turns out dry or crumbly, the issue is usually excess baking time or incorrect moisture balance. First, check your oven temperature with an oven thermometer—many home ovens run 25°F hotter than set.
Bake at 350°F for 25-30 minutes max, and remove immediately when a toothpick comes out with moist crumbs. Overbaking is the #1 cause of dryness in gluten-free cakes. 🔥
For moisture issues, ensure you used melted coconut oil (not solid) and room-temperature almond milk. If your almond flour was too fine (like cake flour), sift it before measuring to prevent dryness. A quick fix? Brush warm cake layers with 2 tbsp dairy-free milk before frosting to restore moisture.
Cake Sticks Together
This sticky texture happens when the cake doesn't cool properly or the batter was overmixed. First, ensure you cooled the cakes completely on a wire rack for at least 1 hour before frosting.
If the issue persists, your flax eggs might not have set properly—measure the ground flaxseed precisely (1 tbsp per egg) and let them thicken for 5-7 minutes before using.
For a sticky batch, try this: Wrap the cooled cake in plastic wrap and refrigerate for 30 minutes to firm up. Then slice carefully with a warm knife (dip in hot water and wipe dry) to prevent tearing.
If the cake still feels gummy, your coconut oil may have been too cold—always melt it completely before mixing.
Cracked or Sunken Top
Cracks or a sunken center usually mean your batter was too wet or the oven temperature fluctuated. Tap the pans 3-4 times on the counter after filling to release air bubbles, and avoid overfilling (use ¾ full pans).
For sunken centers, your baking powder may have expired—always check the date and use gluten-free certified baking powder like Bob’s Red Mill.
Prevent this by placing a baking sheet on the middle rack to create even heat distribution. If your oven has hot spots, rotate the pans halfway through baking. For a cracked top, try adding 1 tbsp extra almond milk to the batter—this helps with structural integrity.
A cracked top is actually a good sign (it means the cake is done), but you can cover it with frosting for a smooth finish.
No Rise or Dense Layers
Dense layers almost always mean your baking powder wasn’t activated properly. The apple cider vinegar is crucial—don’t skip it! Mix it with the wet ingredients last to ensure full activation. Also, whisk your dry ingredients vigorously for 30 seconds to aerate them before combining.
If you’re at high altitude (3,500 feet+), increase baking powder to 1 teaspoon and reduce almond milk by 2 tbsp.
For extra lift, fold ½ cup whipped coconut cream into the batter just before baking. This adds air without making the cake too wet. If your cake still doesn’t rise, your almond flour may have gone rancid—check for a nutty smell and replace if needed.
Store almond flour in the freezer to preserve freshness.
Bitter Aftertaste
A bitter taste usually comes from overmixing the batter or using too much espresso powder. Mix the wet and dry ingredients just until combined—overmixing develops gluten-like proteins in almond flour, creating bitterness.
For the espresso powder, 1 tbsp is perfect—any more and the chocolate flavor will turn harsh. If you love coffee flavor, try 1 tsp instant coffee granules instead.
To balance bitterness, add ½ tsp vanilla bean paste (instead of extract) or a pinch of sea salt to the batter. For a sweeter cake, increase sugar to 1.75 cups and reduce almond milk by 2 tbsp.
If the bitterness persists, your cocoa powder may be natural (not Dutch-processed)—switch to Valrhona or Ghirardelli for a smoother flavor.
Nutrition facts
Frequently asked questions
Can I substitute almond flour with another gluten-free flour?
Yes! For a 1:1 swap, try oat flour or walnut flour, though texture will differ slightly. Oat flour adds a mild sweetness, while walnut flour offers a richer nuttiness. If using coconut flour, reduce it to 1 cup and add 2 extra tbsp almond milk—it absorbs more liquid. Always sift first to prevent dryness.
How do I make this recipe egg-free AND nut-free?
Replace flax eggs with applesauce (1:1 ratio)—use 4 tbsp total for binding. Swap almond flour for sunflower seed flour or coconut flour (1 cup + 2 tbsp extra liquid). For extra moisture, add ¼ cup dairy-free yogurt to the batter. The cake will be denser but still delicious.
Why does my cake taste bitter?
Bitterness usually comes from overmixing or too much espresso powder. Mix just until combined—overworking develops gluten-like proteins in almond flour. Reduce espresso to ½ tbsp or swap for 1 tsp instant coffee granules. Balance flavors with ½ tsp vanilla bean paste or a pinch of salt. Natural cocoa powder (not Dutch-processed) can also add bitterness—try Valrhona for smoother results.
Can I bake this in a single 9-inch pan instead of two 8-inch pans?
Yes! Reduce oven temperature to 340°F and bake for 35-40 minutes in a single 9-inch pan. The cake will be thicker but still moist. For even baking, place a baking sheet on the middle rack. Let it cool completely before slicing—thicker cakes need extra time to set.
How do I store leftovers without drying them out?
Wrap slices tightly in plastic wrap or store in an airtight container with a slice of bread to retain moisture. Refrigerate for up to 5 days or freeze for 3 months. To revive, warm in the microwave for 10-15 seconds or at 300°F for 5 minutes. Avoid storing at room temperature beyond 2 days.
