Make this decadent gluten free dairy free chocolate cake with a ‘secret ingredient' that makes it a super tender, without any added butter or eggs!
WANT TO SAVE THIS RECIPE?
What makes this gluten free dairy free chocolate cake special?
The secret ingredient in this chocolate cake that replaces eggs and butter in this cake is mayonnaise. Mayonnaise is a stable emulsion made of eggs and oil.
I promise it doesn't make the cake taste like mayo. I'm not a mayo person for the sake of it; I just love this cake.
I don't generally like to bake with neutral oils like canola and vegetable oil, since they tend to create an oily-tasting cake. Baking with mayonnaise allows us to bake without any dairy substitutes, but still bake a moist and tender, super decadent chocolate cake that is also dairy-free.
If you love mayonnaise, you won't taste it in this cake. If you can't stand mayonnaise, you still won't taste it in this cake.
This isn't a dense cake at all. It's really a snacking cake, like the kind you might have hanging around in the refrigerator or on the counter, and it's also the perfect recipe for an allergy friendly chocolate cake.
You might even do what my grandmother used to do, which is to slice little pieces off the edge as a service to others. That helps to “even” the edges so it looks more appetizing.
If you'd prefer a more “classic” chocolate cake, and you can have dairy, try our one bowl gluten free chocolate cake recipe. It's the standard against which all other cakes are measured.
What chocolate is gluten free and dairy free?
I make all of my favorite dairy-free and gluten free desserts with Enjoy Life brand chocolate chips. They're super rich and high quality. All of Enjoy Life's products are free of the top 8 most common allergens, which include gluten and dairy, making them safe for most people to enjoy (life ๐คญ).
If you need baking chocolate bars to chop, I really like Hu Kitchen brand, which is dairy free and gluten free. Scharffen Berger brand is the higher-quality baking chocolate that I usually turn to, and some varieties don't contain any dairy ingredients.
Some other brands of gluten free dairy free chocolate bars are some varieties from Alter Eco, Green & Black's, and Endangered Speciesโbut they're all quite expensive.
Is there melted chocolate in this cake?
No. This cake is made chocolate-flavored with cocoa powder, not with melted chocolate in the batter. It calls for dairy-free chocolate chips to be mixed into the smooth batter, but they're optional.
When I'm serving this chocolate cake without frosting, I like to melt 1 ounce of chopped chocolate in the boiling water that's mixed with the cocoa powder. It helps to add some more chocolate flavor and richness to the cake itself.
The frosting itself also calls for dairy-free chopped chocolate that's mixed with hot coconut cream to create a dairy-free chocolate ganache. If you're dairy-free, you need to be sure your chocolate is also dairy-free.
More gluten free dairy free chocolate cake ingredient notes
The ingredients list is below in the recipe card, of course, but here are a few things to keep in mind as you gather your wares to make this cake:
- Mayonnaise – Mayo is the magic ingredient in this cake, which adds all the richness and fat we need, eliminating the need for additional eggs, or any butter replacement. I haven't tried this recipe with a vegan mayonnaise replacement, but some readers have and reported success, so it might be worth a try!
- Boiling water – Chocolate cakes that rely heavily on cocoa powder for their chocolate flavor, like this one, often call for “blooming” the cocoa in boiling water by dissolving the powder in the hot water. This step deepens the flavor of the cocoa powder, so don't skip it!
- Cocoa powder – Since this cake has baking soda in it to neutralize any acid in your natural cocoa powder, you can use natural cocoa powder or Dutch-processed, or even Hershey's Special Dark cocoa powder, which is a blend of the two.
- Brewed coffee – The coffee in this recipe doesn't add any coffee flavor. Instead, it deepens the chocolate flavor. You can use decaf or caffeinated coffee, depending on what you have on hand and personal preference.
- Sugar – Not only for sweetness, sugar is also a tenderizer in baked goods. It helps keep the crumb of this cake super tender.
- Salt – Balancing the sweetness and bringing out all the best flavor of this cake, salt is an essential ingredient.
- Vanilla extract – Vanilla extract is as delicious in chocolate cake as it is in our gluten free vanilla cake, deepening all the other flavors, but it can be so expensive. I make my own by steeping vanilla pods in gluten free Bacardi rum, and just keep topping off the rum!
- Gluten free flour blend – I use Better Batter's classic blend here, since it's a stand-out, but any of my recommended all purpose gluten free flour blends will work here, including Cup4Cup or our mock blends if you DIY.
- Cornstarch – A touch of cornstarch adds some lightness to the flour blend, for a more tender crumb. If you can't have corn, try using arrowroot or potato starch.
- Baking soda – Helps give the cake lift, and neutralizes acidic ingredients like natural cocoa powder, if you're using it.
What you won't need for this dairy free, gluten free dessert
Most dairy free baked goods, like DF cakes, use lots of dairy alternatives. This cake is unique, since it doesn't require any of the “usual” dairy-free substitutes. So here's a list of all the ingredients you won't need to make this moist, tender, dairy free chocolate cake:
- almond milk, coconut milk, or other dairy free milk, in place of cow's milk
- coconut oil, as a butter alternative
- dairy free butter, like vegan butter
Is this dairy free gluten free chocolate cake Paleo?
No! This cake is not Paleo, since it's made with a classic rice-based all purpose gluten free flour blend. Rice is not Paleo.
It isn't made with almond flour, either, which has a much shorter shelf life, and is typically very expensive (but worth it, usually!). The best Paleo chocolate cake is, indeed, made with almond flour.
Tips for making the best gluten free, dairy free cake
Carefully select and measure your gluten free flour
As always, choose your all purpose gluten free flour blend carefully, and measure by weight. Here, I usually use Better Batter since I always have it on hand in bulk, and it works so well. But my Better Than Cup4Cup blend works perhaps even better (just use more of that flour blend to replace the cornstarch, as a separate ingredient).
You must measure flour, especially, using a digital kitchen scale for reliable baking results. Dry measurement cup sizes are not standardized, and it's impossible to measure accurately using them, anyway.
Use parchment paper in your cake pans
I like baking in cast aluminum pans best, since they never warp, are light in color so don't encourage over browning, and bake so evenly. But they're not usually nonstick, so be sure to grease them well with cooking oil spray, and line the bottom of your cake pan with parchment paper to ensure easy release.
Let your dairy free, gluten free cake cool before frosting
Unless you want your frosting or icing to disappear into your cake, always let it cool completely before you frost it. A warm cake will melt your frosting and ruin its texture, even if you refrigerate it after to firm it back up.
How to frost your GF DF cake
I include a dairy-free ganache frosting recipe, including instructions on how to make it into a whipped ganache frosting for this cake. It's super decadent, and not overly sweet, as the only sugar in the frosting comes from the chocolate.
You can also use your favorite dairy free buttercream frosting, or serve this cake without any frosting at all. A light dusting of confectioners' sugar on a completely cooled cake would make a nice touch.
Keeping gluten free, dairy free chocolate cake fresh โ storage tips
This cake is moist enough that it will stay fresh on the counter, covered well, for a couple of days. For longer storage, I recommend freezing it.
Can I make this gluten free dairy free chocolate cake in advance?
Yes! Since this cake has a really tender crumb, you can make and cool it, then wrap it tightly (unfrosted!) in cling wrap, storing it on the counter for at least 2 days. Once you frost the cake, it's really hard to wrap it tightly, so it's best to serve it the same day after it's been frosted.
Can I freeze this gluten and dairy free cake?
For longer storage, wrap this cake tightly in freezer-safe wrap like Glad Press ‘n' Seal. You can freeze it frosted or unfrosted, but it's easiest to store the uncut cake unfrosted.
If you have leftover cake that's already been frosted, slice it into squares and wrap each frosted square tightly on its own, then freeze. Defrost at room temperature, or even in the refrigerator, for a dairy free, gluten free treat any time.
Gluten free dairy free chocolate cake: Ingredients and substitutions
Can you make this dairy free chocolate cake without mayonnaise and/or eggs?
This cake is made with mayonnaise, which contains eggs and oil in perfect emulsion. I haven't tested it with “vegan” mayonnaise. I am very curious to see if it would work, but I can't give any guidance.
If you can't have eggs, I recommend making our gluten free chocolate crazy cake, which is vegan. It descends from a Depression-era special that doesn't call for eggs at all.
You must use regular, full-fat mayonnaise. Not a “light” version, or one made with olive oil (which is also “light”).
Avoid mayonnaise with added flavors, too. If possible, use Hellmann's, since I think anything else tastes quite different.
How to replace cornstarch in this dairy free gluten free chocolate cake
Cornstarch is used in this recipe to tenderize the cake by increasing the starch component that's already in your all purpose gluten free flour. This assumes that you're not already using a higher-starch blend, like Cup4Cup.
If you're already using a higher starch blend, use more of that blend in place of the cornstarch. If you're not, but you need to avoid corn, you can use arrowroot, or even potato starch, in its place.
Do you have to use brewed coffee in this gf dairy free chocolate cake?
No, you don't have to use brewed coffee at all. But it does deepen the chocolate flavor. It doesn't make the cake taste like coffee, though.
In place of the brewed coffee, you can use more boiling water. You can also replace some hot water with more coffee.
Decaffeinated coffee is fine. So is caffeinated coffee.
How do I make this a sugar free, dairy free, and gluten free cake?
You may be able to make this cake with Lankato brand monkfruit granulated sugar alternative. Alternative sugars tend to dry out a cake's batter, so pay close attention to the texture of your cake batter, and add more hot water by the teaspoonful to match the texture you see in the photos and video on this page.
What other gluten free dairy free desserts are there?
Since I have a section in every post like our “ingredients and substitutions” section above, almost all of my gluten free desserts recipes can be made into gf df desserts. Here are a few other gluten free dairy free dessert recipes you might also want to try:
- Vegan gluten free chocolate chip cookies (they're made without an egg substitute, so they're naturally vegan, and of course dairy free)
- Dairy free gluten free fudge (made with just 3 incredibly simple ingredients: sugar, coconut milk, and unsweetened chocolate)
- Dairy free gluten free white chocolate (made with smooth, creamy cacao butter)
- Dairy free gluten free no churn ice cream (a favorite cold, sweet treat, without any fussโand never icy!)
- Classic gluten free pie crust made dairy free (be sure to follow the dairy free option in this light and flaky pie crust recipeโand make any pie you want!)
FAQs
Mayonnaise is, indeed, dairy free. There is sometimes confusion about whether mayonnaise is dairy free, presumably since it's so creamy and looks like dairy.
No, this cake was developed to be made with an all purpose gluten free flour blend, which is necessarily rice-based. A cake made with any of those flours would have to be developed to be made with them, as they aren't all purpose flours.
Adding brewed coffee to chocolate desserts is a time-honored way to help enhance chocolate flavor. You don't taste the coffee, but you can replace it with nondairy milk if you'd prefer.
A cake that cracks on the top is usually baked in an oven that's too hot, which caused too much of a quick rise at the start. Many ovens run hot, including mine, so I rely on a freestanding oven thermometer that I replace frequently, to ensure proper baking temperatures.
Yes! You can measure out most of the dry ingredients for this cake and whisk them together to save for whenever you're ready to make this cake. But don't add the cocoa powder to that mix, since you'll need to bloom that in the hot water separately at the start of the recipe.
A cake that rises and then falls as it cools is usually not baked all the way through, even though it may have looked done on the top. If the center isn't as firm as the rest of the cake, it will cave in on itself as it cools and the air created during the baking process escapes.
Always follow a recipe's doneness test, which here is to insert a cake tester (like a toothpick) in the center and make sure it comes away with no more than a few moist crumbs attached. If the cake tester is wet, the center isn't fully baked.
Gluten Free Dairy Free Chocolate Cake
Ingredients
For the cake
- ยพ cup (6 fluid ounces) boiling water
- ยผ cup (2 fluid ounces) strong brewed coffee (See Recipe Notes)
- ยผ cup (20 g) unsweetened cocoa powder (natural or Dutch-processed)
- 1 ounce dairy-free dark chocolate chopped (optional)
- โ cup (150 g) mayonnaise (full fat, regular mayo)
- ยพ cup (150 g) granulated sugar
- 1 /4 teaspoon kosher salt
- 1 teaspoon pure vanilla extract
- 1 ยผ cups (175 g) all purpose gluten free flour blend (I used Better Batter; please click thru for details)
- Heaping 1/2 teaspoon xanthan gum omit if your blend already contains it
- ยผ cup (36 g) cornstarch
- 1 teaspoon baking soda
- 6 ounces dairy-free semi-sweet chocolate chips optional
For chocolate topping (optional)
- 10 ounces dairy-free dark chocolate chopped
- ยพ cup (6 fluid ounces) canned coconut cream (See Recipe Notes)
Instructions
For the cake.
- Preheat your oven to 350ยฐF. Grease and line an 8-inch round or square baking pan. Set the pan aside.
- In a medium-size, heat-safe mixing bowl or measuring cup, place the boiling water and brewed coffee and the cocoa powder, and whisk until well-combined. The cocoa powder will resist combining, so just keep whisking.
- Add the (optional) chopped chocolate, and mix until melted and smooth. Add the mayonnaise, sugar, salt, and vanilla, and whisk until well-combined.
- In a large bowl, place the flour, xanthan gum, cornstarch, baking soda, and about 5 ounces of the (optional) chocolate chips, and mix to combine and coat the chips in the flour.
- Create a well in the center of the dry ingredients, and add the wet mixture. Mix until very smooth and well-combined. The batter will start off very thin, but will thicken a bit as you stir. Keep mixing until that happens.
- Transfer the cake batter to the prepared pan, and smooth into an even layer using a moistened spatula or broad, flat knife.
- Sprinkle the remaining (optional) chocolate chips evenly over the top, and bang the cake a few times on the counter to help the chips adhere.
- Place the pan in the center of the preheated oven and bake for about 30 minutes, or until done.
- Doneness should be determined by a few things: the cake should be puffed and rounded at the edges. It also shouldnโt jiggle when moved back and forth, and a toothpick inserted in the center should come out mostly clean (and certainly not wet).
- Remove the cake from the oven, place the pan on a wire rack and allow to cool completely in the pan. To make it easier to slice, you can chill the pan in the refrigerator.
For the topping.
- Place the chopped dark chocolate in a small, heat-safe bowl.
- Place the coconut cream in a small, heavy-bottom saucepan and melt over a low flame. Pour the hot cream over the chopped chocolate.
- Allow the chocolate and hot cream to sit, undisturbed, for about 5 minutes before whisking until completely smooth.
- Pour the glaze directly over the cooled cake, and allow it to set at room temperature.
- To whip the chocolate ganache into frosting, allow it to cool at room temperature, then cover and refrigerate it until beginning to set (about 20 minutes).
- Using a handheld mixer or a stand mixer fitted with the whisk attachment, whip the frosting until lighter in color and relatively fluffy (about 3 minutes).
- Frost the cakes as desired, then slice and serve.
Notes
You can use decaffeinated coffee. You can replace the brewed coffee with more water, but I donโt recommend it. The coffee enhances the chocolate flavor without tasting like coffee. For the coconut cream in the topping.
If you donโt have to be dairy-free, use heavy whipping cream in the same amount. If you do use the coconut milk, do not use โlightโ coconut milk, which is just thick coconut milk with water added. Cake recipe adapted heavily from The New York Times chocolate snack cake. Originally published on the blog in 2021. In 2022, more text and resources added to the post; recipe unchanged.
WANT TO SAVE THIS RECIPE?
Thanks for stopping by!
Hi, Iโm Nicole. I create gluten free recipes that really work and taste as good as you remember. No more making separate meals when someone is GF, or buying packaged foods that arenโt good enough to justify the price. At Gluten Free on a Shoestring, โgood, for gluten freeโ just isnโt good enough! Come visit my bio!
Joan Gordon says
I canโt use any gf flour blends because of sensitivities to all of the starches in them, potato, tapioca, cassava and corn. What do you suggest? I am trying to make my own gf flour blendโฆ but what flours are the most similar to the Better Blend?
I have the same problem with your bread recipes. Help!
Thanks
Nicole Hunn says
I’m afraid you can’t make any of my recipes or any of my all purpose flour blends without starches, Joan. You might do better with a Paleo recipe site?
Tyro b says
I never baked a cake before and this one was bomb. ๐ค
Nicole Hunn says
That’s awesome, Tyro! Hopefully it’s the first of many cakes in your future. :)
Lucinda says
A triumph for us gluten-free diary free campers! One hour ago I took it out of our portable Coleman oven that sits on top of our 20,000Btu Camp Chef outside propane stove. Delicious! Iโm always looking for less delicate offerings and for my husbandโs health I use 1/2 sugar and 1/2 swerve! Iโve had camping success with many of your recipes. Thank you so much, Nicole.
Nicole Hunn says
That’s so awesome to hear, Lucinda! Camping success is definitely a special kind of success, I imagine. :) Good to know that you were pleased with the cake made with half Swerve, so thanks for sharing that.
Jeanne Wong says
Beyond delicious! I will never understand the magic of mayo or boiled water. As always, your recipes are the best of the best!
Nicole Hunn says
Haha, Jeanne, so true! I just try to appreciate them and let them work their magic. ๐ช
Wendy says
I was totally confused when I read your comments about the recipe being egg-free, given it has mayonnaise in it. But thatโs because I had no idea you can get egg-free mayo! Who knew? I look forward to trying it out when my grandson comes, as he has an egg allergy and often misses out when it comes to cakes.
Nicole Hunn says
Oh it’s not egg free, Wendy! I said it doesn’t have added eggs, as in additional eggs as an ingredient. As I explain in the post, I haven’t tried this recipe myself with egg-free mayo, but others have and have reported success so it’s definitely worth a shot!
Wendy says
My mistake, Nicole! I must have read โdairy-freeโ and had brain freeze! But. Iโll certainly try an egg-free mayonnaise and see how it turns out.
Sandra Mosolgo says
Could it be baked in cupcake liners?
Nicole Hunn says
I’m honestly not sure how this recipe would turn out baked as cupcakes. I don’t generally like to use the same recipe for cake as for cupcakes, except when I’m using a DIY cake mix, as they generally don’t turn out as well when used interchangeably. Sorry I can’t be of more help, Sandra!
Lynn says
Thanks for another great recipe! Weโve got an egg allergy, so I swapped the Mayo for a vegan Mayo (Hellmanโs) but made no other changes. Eggs can be so tricky to replace, but Iโm happy to report that it turned out great!
Nicole Hunn says
Oh that’s so great, Lynn, that it worked with Hellmann’s vegan mayo. I didn’t even know they made a vegan mayo. So good to know. Thank you for sharing that!
Franny says
Delicious! I’ve used mayonnaise in other cakes and it has always been delicious and produces moist cakes. I used dark chocolate and added some peanut butter for grandkiddos. Came out so tasty. I made a simple peanut butter glaze of just water, peanut butter and powdered sugar. Complimented the added peanut butter in the recipe. Thanks for this winner!
Dawn says
I made this exactly as written. Whipped the the ganache into a frosting – wow! It really worked! My husband loved the dessert – suggested I add a mint leaf and cherry as a garnish. Definitely will make this again. A keeper!
Again, I added 10 min cooking time to account for our higher altitude. Thanks again Nicole!!
Nicole Hunn says
Haha, Dawn, it is kind of amazing, how you can make a rich chocolate frosting with just 2 ingredients like that. I love the fancy garnishes! Thank you for sharing your high altitude adjustment. And so glad you enjoyed the cake!!
Emma says
I’m confused about the chopped chocolate. The recipe says to add it to the coffee mixture but then later it says to add it to the dry mixture. I had already added it to the warm coffee. Should there be a required are optional chocolate ingredients?
Nicole Hunn says
I think you’re confusing the chopped chocolate (which is optional and gets melted in the hot water) with the chocolate chips (which are also separately optional and get added in the dry ingredients) Emma!
George Goodwin says
Hi Nicole,
I love your recipes. My wife appreciates them even more. She’s the one who’s gluten/dairy intolerant. I’m the one who makes the recipes. It’s taken me a while to realize that I could only comment on current (or recent) recipes, but I have one now! Would Olive Oil mayonnaise flavor also disappear? That’s what we usually use. But if not, I’ll buy some regular mayo just for this recipe. It looks amazing!
Nicole Hunn says
That’s so great, George! And yes, comments close after about 5 or 6 months. But with 2 new recipes every week, there’s always a place to leave a comment. ๐ Definitely put some “regular” mayonnaise on your shopping list for the next trip. The olive oil mayonnaise (which we like, too) is actually a “light”version under a different name. I don’t recommend using it. I hope that helps!
Leilani Smith says
I am so excited to try this because tomorrow is my close friend’s birthday. She is dairy free and gluten free. (I am too.) Now I can cook her (and myself later when my birthday occurs) a cake for her birthday! Thank you for posting this.
Nicole Hunn says
That’s awesome, Leilani! I think you’ll both love the cake. Happy Birthday to her!
Michelle says
Great cake!! I used vegan Mayo and put egg replacer powder with the flour with great success! My non allergic family thought it was great too!!
Nicole Hunn says
That’s an interesting swap, Michelle. Eggs are really tricky to replace! Glad it worked well.
Barb C says
Made this yesterday. Easily the best gluten free cake Iโve ever made! My picky teenagers and husband raved about it. I make my own blend of gf flour- mix of cassava, tiger nut, almond and coconut flours, and it worked beautifully. I have shied away from xanthan in the past due to food sensitivities but tried it here wit success and I think it is very key in this recipe. The texture and taste are excellent. Thanks for the recipe!
Nicole Hunn says
Hi, Barb, I’m glad you enjoyed it. Please understand that that’s really not an all purpose gluten free flour blend, and it is so different as to create a different recipe. I’m glad you got lucky this time!
Alene says
I guess the oil and egg yolk in mayo makes it accomplish the same purpose as eggs and fat in the cake recipe. But mayo in cake recipes always weirds me out. I’m so afraid to try it.
Nicole Hunn says
I wouldn’t ever post anything that wasn’t great. But there are so many chocolate cake recipes here on the blog, Alene. Try another one!
Dreโ says
Do you use the just the cream on top of the canned coconut milk?
Nicole Hunn says
Hi, Dre’, Yes, use just the cream! The less water, the better.