Dairy Free Gluten Free Chocolate Cake

January 29, 2021
At a Glance


This decadent chocolate cake is naturally gluten free and dairy free, and is made with simple pantry ingredients. A simple snacking cake, you eat some here and some there. None of it “counts.”


Prep / Cook Time

10 minutes / 30 minutes


 5/5 (6 votes)
Dairy Free Gluten Free Chocolate Cake

This decadent dairy free gluten free chocolate cake is made with a ‘secret ingredient’ that makes it super tender without any added butter or eggs.

Chocolate frosted chocolate cake in square baking pan with one piece missing

What makes this chocolate cake different?

The “secret ingredient” 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 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.

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.

Overhead image of chocolate cake batter in a bowl being stirred

What chocolate is gluten free and dairy free?

My favorite dairy-free and gluten free chocolate chips are from Enjoy Life brand. 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 chocolate in this cake batter?

Like our chocolate crazy cake, 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 dairyfree chocolate ganache. If you’re dairy-free, you need to be sure your chocolate is also dairy-free.

Chocolate cake batter in square cake pan lined with white paper

Is this cake Paleo?

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.

Fork with chocolate crumbs on white plate with rest of chocolate frosted chocolate cake partially eaten

Ingredients and substitutions


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.


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.


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.

Chocolate frosted chocolate cake in baking pan with one piece missing and one square piece cut

Words Gluten free dairy free chocolate cake on cake in pan with piece missing

Like this recipe?

Prep time: Cook time: Yield: 1 8-inch cake


For the cake
3/4 cup (6 fluid ounces) boiling water

1/4 cup (2 fluid ounces) strong brewed coffee (See Recipe Notes)

1/4 cup (20 g) unsweetened cocoa powder (natural or Dutch-processed)

1 ounce dairy-free dark chocolate, chopped (optional)

2/3 cup (150 g) mayonnaise (full fat, regular mayo)

3/4 cup (150 g) granulated sugar

1 /4 teaspoon kosher salt

1 teaspoon pure vanilla extract

1 1/4 cups (175 g) all purpose gluten free flour (I used Better Batter)

Heaping 1/2 teaspoon xanthan gum (omit if your blend already contains it)

1/4 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

3/4 cup (6 fluid ounces) canned coconut cream (See Recipe Notes)


  • 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.

  • To make 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 and allow it 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, and then slice and serve.

  • Cake recipe adapted heavily from The New York Times chocolate snack cake.


Where should I send your free guide?

By entering your email, you're agreeing to our Privacy Policy. We respect your email privacy, and will never share your information.