This gluten-free, dairy-free chocolate cake is easy to make for a dessert everyone can enjoy. You’d never know it’s also egg-free, since it’s rich, chocolatey, and moist, with a crumbly texture that will win anyone over at first bite.

Ingredients
There aren’t many ingredients in this cake, but each one has a job. Here’s why I use them, with more details and substitutions in the FAQs below.
- Gluten-free baking flour mix: I stand by the results I consistently get by using Bob’s Red Mill Gluten-Free 1:1 Baking Mix. This recipe will not work with almond or coconut flours.
- Sugar: Use traditional, granulated white sugar.
- Cocoa powder: Use unsweetened cocoa powder (nothing fancy) work best.
- Baking soda: This is what helps the cake rise.
- Salt: Brings out the flavors in the batter.
- Dairy-Free Chocolate Milk: Using already-mixed, dairy-free chocolate milk gives this cake a richer chocolate flavor.
- Vegetable oil: Use a neutral oil (canola or vegetable) to add moisture to this cake batter. Coconut oil works too, but it leaves a slight coconut taste behind.
- Vinegar: Use apple cider vinegar or plain white vinegar. It helps the cake rise when mixed with baking soda.
- Vanilla: A little to enhance the chocolate flavor; a must for cakes.
How to Make Gluten-Free Dairy-Free Chocolate Cake
- Prep
Preheat the oven to 350F and grease two 9-inch cake pans. - Make the batter
Whisk the dry ingredients in one bowl and the wet ingredients in another, then gently stir them together until the batter is smooth and no dry flour remains. Divide the batter evenly between the pans. - Bake
Bake for 25 to 30 minutes, checking around minute 25. They’re done when the centers are set and a toothpick inserted in the middle comes out clean. - Cool
Let the cakes cool in the pans for 10 minutes before transferring them to a wire rack. Let them cool completely before frosting, or the frosting will soften and slide. - Frost the cake
Make sure the frosting is soft enough to spread, especially if you refrigerated it. Frost the first layer, add the second cake layer, then cover the top and sides.

Dairy-Free Chocolate Frosting
If you’ve found a store-bought frosting that meets your ingredient needs, you’ll need one 16-ounce tub for this two-layer cake. Or, make my dairy-free chocolate frosting while the cake cools. It’s made with vegetable shortening, which yields a thick and easily spreadable frosting.

Laura’s Tips for The Best Gluten Free Dairy Free Cake
Yes. Don’t omit the vinegar. Apple cider vinegar or white vinegar both work; the acid reacts with the baking soda to help this egg-free cake rise. You’ll hear some fizzing when you combine the wet and dry ingredients, which means the reaction is working.
The chocolate milk gives the cake a richer, sweeter chocolate flavor. Almond, oat, or cashew-based chocolate milk all work. I’ve found that plain, unsweetened dairy-free milk makes the finished cake noticeably less sweet.
Don’t omit the sugar. If you want to replace the white sugar, many readers have successfully used coconut palm sugar. I’ve tested it once myself and found that the cake was less crumbly. Don’t use honey or liquid stevia; I haven’t personally tested xylitol or other granulated sugar alternatives.
After many tests, I stand behind Bob’s Red Mill 1:1 Gluten-Free Baking Flour and King Arthur Flour Gluten-Free Baking Mix for this cake. Both contain xanthan gum, which helps bind the egg-free batter together. You can find both at many local grocery stores or online (Amazon). You cannot use almond or coconut flour for this recipe.
Yes. For cupcakes, bake for 18 to 22 minutes and start checking them around minute 16. For a three-layer cake, divide the batter between three 6-inch pans. You can also bake it in a 9×13-inch pan, but keep an eye on the baking time since it will vary slightly. You’ll also find this information in the recipe card notes.
Yes. You can freeze the baked cake layers and thaw them the day you plan to frost the cake, or freeze the finished cake frosting and all. I’ve found that freezing and thawing doesn’t noticeably change the texture or flavor, which makes this a great cake to make ahead for a party.
More Gluten and Dairy Free Desserts
After you make this cake, try my healthy no-bake blondies, this avocado chocolate mousse, or a coconut almond flour chocolate cake. While not a dessert, these cassava flour pancakes are also worthy of a weekend breakfast celebration.
Gluten, Dairy, and Egg Free Chocolate Cake

Watch how it’s made:
Ingredients
- 3 cups gluten-free baking flour, tested with Bob's or King Arthur; see note for other options
- 1 ¾ cups granulated sugar
- 6 tablespoons unsweetened cocoa powder
- 2 teaspoons baking soda
- 1 teaspoon salt
- 2 cups chocolate non-dairy milk
- ½ cup vegetable oil
- 2 tablespoons apple cider vinegar, or white vinegar
- 1 teaspoon vanilla
- 1 batch dairy-free chocolate frosting
Instructions
Prep:
- Preheat the oven to 350F with the top rack positioned in the middle of the oven. Grease two (2) 9-inch cake pans with oil (or cooking spray) and set aside. You can also use parchment liners for the bottom, but I still recommend lightly greasing the sides.
Mix:
- In a large bowl, add the gluten-free flour, sugar, cocoa powder, baking soda, and salt. Whisk the dry ingredients well to ensure they're evenly mixed.
- In a separate bowl, whisk the dairy-free chocolate milk, oil, vinegar, and vanilla. Then pour the wet ingredients into the dry ingredients bowl and stir gently until the batter is smooth and all the flour is incorporated.
- Divide the batter evenly between the prepared cake pans.
Bake:
- Bake in a preheated oven for 25 to 30 minutes, until the centers are set and a toothpick inserted in the middle comes out clean. I check around minute 25, and if one pan is set but the other isn't, remove it and let the other finish baking for a couple of extra minutes.
- Remove the cake pans from the oven and let the cakes cool in the pans for 10 minutes, then transfer them to a wire rack to cool completely before frosting.
Frost:
- While the cakes are cooling, make the frosting. If you've made it ahead of time, take it out of the fridge and let it come to room temperature so it's easier to spread.
- Place one cake layer on a plate or cake stand and spread about a cup of frosting over the top. Add the second cake layer, then spread the remaining chocolate frosting over the top and sides.
Serve and store:
- Store the frosted cake, covered, at room temperature for up to 2 days or refrigerate for up to 5 days. Take it out of the fridge and let the cake come to room temperature before serving for the best texture.
Notes
- For a 3-tiered cake: You’ll need to fill three (3) 6-inch cake pans with batter.
- Cupcakes: Turn this into cupcakes by baking for 18 to 22 minutes, checking that a toothpick comes out clean around minute 16.
- 13 x 9-inch pan: You can use a rectangular pan for this cake recipe, but keep a close eye on the baking time, as it will vary by a few minutes from the original recipe.
- Using other gluten-free flour mixes: I recommend the two listed here because they include xanthan gum, an essential ingredient that binds and thickens the batter. If you’re using something else and it doesn’t include it in the ingredients, add 2 teaspoons of xanthan gum to the dry ingredients. This recipe only works with baking mixes, not with other alternatives (like almond or coconut flours).
The recommendations below may include affiliate links.










Rebekah says
My cakes are currently in the oven, but my batter is very thick, to where I had to press it into the bowl. I followed the recipe exactly. Do you have any thoughts?
Laura says
I’m not sure, how did the baked cakes turn out?
Mary says
Same happened to me and resulted as a gum cake. Not good. I think there is too much xanthan gum suggested in the recipe
Elizabeth says
This happened to me, too! I followed the recipe exactly- my GF flour blend already had xanthum so I didn’t add any extra. My cake batter is so thick I am having to scoop it out of the bowl and press into the pans!!!
How did yours taste?
Emma says
Hi I had this same problem, I accidentally added doubled the amount of xanthum gum because it was also in the flour. Is there any way to fix this?
Laura says
Hi, unfortunately, there is no way to fix this. You could always go ahead and bake the batter to see how it turns out.
Teresa B says
Has anybody made this as a sugar free version?
Laura Fuentes says
Yes, with granulated sugar alternatives such as Swerve brand which perform like sugar.
Phil says
Best chocolate cake ever! I used a little less sugar than the recipe required and it was perfect. I also used regular lactaid instead of chocolate lactaid so I added extra cocoa powder. I was so surprised that it rose the way it did!
emily says
what brand/kind of chocolate free milk did u use? i know lactacid and silk carries chocolate milk.
Laura says
I used silk dairy-free chocolate milk.
Bonnie says
It worked so well with oat milk.
Erica F says
I have a few questions:
1.) Can you use regular milk in this recipe?
2.) Can you use plain, unsweetened, non-dairy milks that are not chocolate?
3.) What is the bake time if you are using 6″ cake pans?
4.) If you are only making 2, 6″ layers can you reduce the recipe by 1/3?
Laura says
Hi Erica, you can make this with any milk. I don’t recommend omitting the chocolate milk since it helps sweeten the batter and make it more chocolatey. As far as bake time goes, keep an eye on it around the 25-minute mark. Once a toothpick or knife inserted in the center comes out with a few moist crumbs, it’s ready. Go ahead and make the full recipe, changing the ingredient measurements could result in the cake not turning out. You might just have an extra layer of cake, and that’s a good thing!
JUDYTH says
Does the recipe refer to American Cups – or Canadian,? Could you give weight in grams please?
Michelle Mattingly says
I made this over the weekend and it was a hit, the comments were the same “would have never known it was allergy free”. It was perfect. My son in law is gluten free, my daughter in law is dairy free and my grand daughter is very allergic to peanuts. I made it with plant based chocolate milk I found at Target and chose that instead of almond milk to keep it totally nut free.
I will certainly be making this over and over.
Mary says
Did you use xanthan gum. I do real y wanted to doit for me and used xanthan gum resulted in an elastic cake even though I did follow strictly the recipe. Any thoughts?
Petra says
Did the flour you use have Xanthan-gum in it already?
Or, It might have been a particular type of Gluten-free flour
Cary says
I just made the cake & frosting. I am planning on serving it tomorrow. Do I store in refrigerator or on my kitchen counter.
Thanks,
Cary
PS I tasted the frosting, it is delicious!! Can’t wait to try the finished cake
Laura says
You can store a frosted cake in a cake stand on the counter. If it’s unfrosted, I advise wrapping the cake layers with plastic wrap and storing them in a large airtight container at room temperature.