Gluten-, Egg-, and Dairy-Free Chocolate Cake

Are you frustrated at the lack of allergy-friendly cake options? I know I was.

Gluten Egg Dairy Free Chocolate Cake 2

I’ve had to create a lot of recipes to replace some of the classics that my daughter was used to eating before her diagnosis. I was thrilled when Laura, the Chief Mom, shared her gluten-free chocolate cake recipe with me.

You know that MOMables makes the best school lunch menus, right? With foods that kids will actually eat. As a mom, Laura is also concerned with all the other things that kids eat at home, school, and on-the-go. This includes simple treats such as this one, one of the things kids seem to miss the most when celebrating birthdays.

For food-allergy parents, it can also be scary or disheartening. Parties, sweets, treats. We can’t just run to the local grocery store and pick up any cake from the case. It’s not safe.

So we’re forced to shell out the big bucks at a specialty bakery that caters to allergy-free needs or come up with a yummy recipe of our own. Don’t worry—MOMables has you covered!

At the next birthday party at school or gathering at your home with friends, everyone will be asking for a copy of the recipe—and a second helping!

My daughter is in love with this cake. So much so, she threw a birthday party for one of her dolls just so we could make it and even blow out candles. I’m a sucker for that girl, what can I say!? 

Gluten-, dairy-, egg-, and nut-free, but not free from taste! It’s moist. It’s rich. It’s delicious! It will cure those chocolate cravings, too.

We’ve even included a yummy frosting recipe to go with it. Just add when cooled, and decorate to your needs!


A few recipe notes:

The vinegar cannot be substituted unless it’s replaced with another acid. It’s necessary to help the cake rise after it reacts with the baking soda. You’ll notice after you pour the milk/vinegar mixture into the dry ingredients that it will make a fizzing sound—don’t worry! That’s good! It means it’s working. If yours doesn’t fizz, that probably means your baking soda has gone bad, and you won’t get the rise you’re looking for. If you don’t have apple cider vinegar, you can use white vinegar instead.

The batter is quite runny but not liquid. You should feel that it has some volume to it.

The unsweetened cocoa powder is also important to use and not Dutch-pressed, in this case. Unsweetened cocoa powder in its natural state acts as an acid and will also react to the baking soda, creating a leavening action that will also help your cakes to rise properly when baked.

Now, let’s celebrate! “Let them eat cake!”

4.5 from 8 reviews
Gluten-, Egg-, and Dairy-Free Chocolate Cake
Cuisine: Baking
Serves: 2 9-inch round cake pans/ 1 birthday cake.
  • 3 cups gluten-free all-purpose flour
  • 1¾ cups granulated sugar
  • 6 tablespoons unsweetened cocoa powder
  • 2 teaspoons baking soda
  • 2 teaspoons xanthan gum
  • 1 teaspoon salt
  • 2 cups chocolate nondairy milk
  • ½ cup vegetable oil
  • 2 tablespoons apple cider vinegar
  • 1 teaspoon vanilla
  • ½ cup nondairy spread or butter
  • 2 teaspoons vanilla
  • ½ cup unsweetened cocoa powder
  • 3 cups powdered sugar
  • ½ cup coconut milk or nondairy creamer
  1. Preheat the oven to 350F. Coat two 9-inch cake pans with cooking spray and set aside.
  2. In a large bowl, combine the flour, sugar, cocoa powder, baking soda, xanthan gum, and salt, and blend.
  3. In a medium bowl, combine the milk, oil, vinegar, and vanilla.
  4. Pour the wet ingredients into the dry ingredients. Stir until smooth, scraping the bottom and sides of the bowl.
  5. Pour into greased cake pans, and place in the oven.
  6. Bake for 25 to 30 minutes, or until a toothpick inserted into the center comes out clean.
  7. Remove from the oven, and let them cool for 5 minutes, then move them to a wire rack to cool completely.
  8. While the cakes are cooling, make the frosting. (I did mine in my food processor, but you can also make it in a large bowl with an electric mixer.)
  9. Beat the butter until light and fluffy.
  10. Add the vanilla, cocoa powder, and powdered sugar.
  11. Add the coconut milk or creamer slowly until it's completely mixed.
  12. If the frosting is too thick, add more creamer 1 tablespoon at time. If it's too runny, add more powdered sugar 1 tablespoon at a time.
  13. Frost the cakes after they are completely cooled.




  1. chrysanthi says

    Dear Momables, what should be the consistency of this cake? Pouring or thick? There are 5 questions above on the same matter that have not been answered, please inform us :) Thank you!

    • says

      You can’t use almond flour in place of an all-purpose gf flour. Almond flour isn’t a “flour” at all it’s just ground almonds. The recipe won’t turn out.

  2. Alyssa says

    Do you need to use x-gum or could you leave it out? That’s the only thing I don’t have. I’m so happy though! Thank you!

  3. Liz says

    My batter was also very thick, definitely not pourable. What type of non-dairy chocolate milk was used? I used SO Delicious coconut.

  4. Mickell says

    If I use all purpose flour, can I omit the xantham gum? I don’t need it to be gluten free and I don’t have any xantham gum.

    • says

      I have not tired this recipe with all purpose flour. it was specifically created for gluten free mixes. You’ll need less flour and yes, you can omit the xg.

      • Mark says


        How much less all-purpose flour? do you think. I also don’t need to be gluten free. Just dairy, nut, egg and soy. I’m not really good at experimenting with recipes. Thanks.

        • says

          Mark, this recipe was not developed for regular flour and therefore I cannot advise specifically on how much less. If you are not an experimenter, I highly suggest looking for a recipe that is egg free only. dairy can easily be substituted in any recipe for an alternative replacement.

  5. Abi says

    The top layer of the cake seemed to be dried up when I tried. Can you please tell me what could have been the problem. Otherwise everything else was fine.

  6. Luisa says

    I’ve never baked a cake before but having a child with dietary restrictions is compelling me to acquire new skills which is great! I tried making this cake in preparation for my son’s 4th birthday this weekend and he is gluten, dairy, nuts, eggs and seafood intolerant. I followed the recipe to a “T” and it turned out fabulously (at least that’s what my office mates said)! The only thing I added is some gluten/nut/egg/dairy free dark chocolate chunks. This cake is fantastic. I brought my “test” cake to work and nobody knew it was allergen-free.

    My only question is, I plan to make a rectangular cake for my son’s birthday. Will a 9×13 rectangular cake pan work with this recipe? Again, thank you so much for sharing this. It will really make my son’s birthday all the more memorable.

    • says

      a 9×13 pan will work. just keep an eye on the baking as time will vary (a few more minutes I think). Glad everyone enjoyed it!

  7. says

    Thanks for this recipe! Its a little LESS sweet than my sweet tooth would like, but my allergy baby is super excited to have a REAL CAKE for his birthday. :)

    I made it as a 9×13–baked for 27 minutes. Its perfect. :) I’m making a lego sculpted cake with it! I used Earth Balance “butter” sticks, Coconut chocolate milk, and Hodgson’s Mill Xanthum Gum. :)

  8. quianna says

    Thanks so much for this recipe! Just deleted dairy, gluten and soy temporarily from my sons diet and his birthday is this week. I was dreading not having a cake to make for him but now I think I can. I do not use vegetable oil anymore and I read a the posts but I’m not sure if there was a definite answer. In lieu of the vegetable oil can I use coconut oil? Also, for the frosting, can I use coconut oil in lieu of the non dairy spread? I’m not a fan of it… Thanks again for all you do!

  9. rebecca says

    I’ve made this twice now, once as a cake and another time as cupcakes, and it has been both times. Gone down a storm with my allergic kids and non allergic family and friends alike. Thanks so much for this! PS I’m in the UK and had no problems…

  10. Gul says


    I wanted to make this for my son’s 1st bday- any suggestions for making it sugar free? Would maple syrup work you think?

  11. Patricia says

    I made this cake for a friend who is Gluten free, egg & dairy – the cake turned out fine, but a bit condensed rather then a regular cake. I used an Artisan Flour Blend GF, ND, I am wondering if there needed to be an adjustment for high altitude since I live in a high altitude city. Should the layers be higher then an inch & a fourth? The outer edge of the cake was also rough and jagged, maybe I will use more liquid to make it smoothier what do you think? Otherwise, the cake does taste good, I guess just need to get use to the thickness of the mixture. :) Patricia

    • says

      Patricia, all flour blends are different so it is a bit difficult to pin point your issue. Altitude will affect rise height for sure. I don’t think you did anything specifically wrong, it’s just the combination of flour used and altitude.

  12. Samah says


    Really excited about finding this recipe. I want to bake my three year old her first real cake. i live in the UK and am worried about taste and measurements having read previous post. Do you have this recipe in metric?

    Also can I use any non-dairy creamer (I’ve never used before and don’t know where to get in UK)

    • says

      I do not have this recipe converted to metric yet. It’s on our to-do list. You can use coconut milk (the thick canned stuff) instead of “non dairy creamer”.

      • Samah says

        thanks! same quantity of coconut milk as non dairy creamer? I’ll try this on Fri and let you know how i get on, can’t wait!

  13. Becky says

    Hi, I tried making this cake a few days ago, I used olive oil instead of vegetable oil and it tasted horrible, I assumed it was because of the olive oil so yesterday I went and bought some vegetable oil and a new pack of bicarbonate of soda (I live in the UK and the internet tells me this is the same thing as baking soda?) and tried again.
    I baked the cake for 25 mins, it wasn’t fully cooked so put it back in for 5 mins, still wasn’t cooked so did it for another 5 mins, and then still wasn’t cooked (the middle was sagging and the bottom still squishy) so put it in for another 5. When I took it out and it was finally cooked it tasted vile. I followed the quantities and recipe to the T – can you please let me know what I’m doing wrong? Is there anything in there that would react badly to too much heat? Or are you supposed to eat the cake whilst it is still partly uncooked? Any advice would be much appreciated – I was so excited to find this recipe and I’m so disappointed!

    • says

      Becky, I think the error might be in your metric conversions. I’m sorry this didn’t turn out well for you, it’s a huge success for us and thousands who have visited this recipe. This recipe allows for NO SUBSTITUTIONS. I don’t know if heat is the issue… since I’m not there making it with you. Please revise your conversions.

      • Becky says

        Thanks for your reply – I used measuring cups for the measurements, I’m assuming a cup in the UK is the same as a cup in the US? Do you know if bicarbonate of soda is the same as baking soda?

        • Megan says

          Actually, a UK cup is bigger than a US cup, so that might be your problem. Bicarbonate of soda and baking soda are the same thing.

          • Judy bernard says

            I made this cake last night. I measured baking soda exactly , but today the cake has a strong soda taste! Can the soda be reduced a little ?

  14. Sangeeta says

    I have just come across thus as my daughter birthday is coming up (10th!)
    I would so much like to try this as yet not really had success in getting a cake or baking her a cake which she has liked.
    She is dairy,wheat,egg,nut free and so I am hoping this recipe could fit the bill!
    I will give it a go to or may try the cupcakes first.
    Will let you know
    Thank you for this.

  15. Melissa says

    I made this cake with coconut milk and the batter was like playdough. It’s still cooking so I’m not sure, but I literally had to push it around to get it to fill in the cake pans. Is this normal?

  16. Claudia says

    Awesome cake. I followed the recipe to the T. But, I thought the frosting was too sweet. I would do maybe 1.5 cups of powdered sugar.

  17. Grace says

    Amazing! Amazing! I made this cake for my birthday. It has been the first “real” tasting cake I have had in the eight months since changing my diet. Did I mention how amazing it is? Thank you.

  18. Jenny says

    Hi there! I am super excited to try this cake! My husband’s birthday is on Tuesday and I only have time to bake the cake today. Do you think it will taste okay if I bake it today and we eat it on Tuesday evening for his birthday? What’s the best way to keep the cake fresh?

  19. Jill says

    What a great cake! I used coconut milk instead of the non-dairy milk and creamer. I increased the cocoa in the cake to 1/2 cup to make up for the bit of chocolate that wasn’t in the cocnut milk. I made them as cupcakes and got 22. Baked for 20 min.
    I haven’t read all the comments but noticed at the top that someone was asking about xantham gum. I have used guar gum very successfully instead of the xantham gum. Guar gum is much cheaper (at least where I live).

  20. Sarah says

    I want to make this but the only cake pan I have is a bundt. Will that work or do I need to go buy new pans?

    • says

      sarah, i dont’ think this will work with a bundt cake. time will need to be adjusted. temperature and cooking time was developed for round cake pans.

  21. Dora says

    In other recipe (marshmallow fluff) you mentioned that xantham gum is fake stuff you didnt want in your fluff and here you are using it for this cake? why?

    • says

      thank you for bringing that to my attention. Different contributors write up the posts so the opinions can vary. I will check on the other recipe.

      that said, xantham gum is not a natural food. it is fermented bacteria from a grain or legume (wheat, corn, soy) into a polysaccharide -although a much cheaper alternative is done from the whey biproduct during cheese production. The xanthan gum polysaccharide is then precipitated from the solution using isopropyl alcohol, dried, and milled into a powder so that it can be added to food and other products. Therefore, Xantham gum is actually a highly processed ingredient.
      It is used in minimal doses when baking with gluten free flours (such as in this recipe) but in a batch of fluff I would need about 2 teaspoons -a dose I’m not comfortable using in one recipe.
      I hope this answered your question.

      • Carol says

        Great recipes! When gf baking, I was taught that xanthum gum is best for breads and guar gum is best for cakes. Guar gum is from the guar bean.

        • Adrienne says

          I’m wondering if I can use applesauce instead of xanthum gum. I’m abroad and don’t have access to xanthum gum so please let me know how much applesauce to use and if I should use baking powder and take out the vinegar & baking soda. Thanks!

          • says

            this recipe has been successful as is. you need xantan gum to make the gluten free flours stretch. I would not make any substitutions. This recipe works as is.

  22. Hannah says

    Hi, I am looking at making my mom some GF mixes for Christmas to help her in her new journey to be GF. I was looking at this recipe because with the vinegar it’s a lot like “whacky cake” that my great grandmother used to make and it’s my mom;s favorite cake. I was wondering if I could mix all the dry ingredients together and place in an air tight container (mason jar) for her to make when she is ready? Also, is the Xantham powder a must? I don’t know what it is or what it does. I am obviously new to this. Thanks in advance!

  23. Eve says

    I have egg and gluten sensitivities but none to dairy. Is it okay to use dairy in place of non-dairy? Just want to be sure as to not ruin the main flavors and chemistry of this cake. Thanks

  24. Pradnya says


    I wanted to make this cake, but am not sure where I can find the xantham gum. I don’t see it at the Safeway that I shop at usually. Where can I get it?

  25. Jenny says

    Great recipe! Just made half the recipe for cupcakes for someone at my husbands office. I used bobs red mill all purpose flour. Not the greatest flour I have to say. I’m not keen on the garbanzo bean in it ( I tasted the uncooked mix) but I was limited to what the store had on its shelf. Having said that, once baked they actually taste pretty good. I’m lucky enough not to have allergies but I’ll certainly use this recipe again. Might try swapping to another flour though ;)

    • says

      great to know that it worked well with BRM! my grocery carries it and I find it to give mixed results. thanks for giving your feedback!

  26. Jeni says

    O.M.G. Sinful!
    My daughter is dairy free, soy free, gluten free, egg free, and CORN free.
    I used 3 cups of rice in the blendtec for the GF flour, SO Delicious brand coconut chocolate milk, and coconut oil.
    Since we can’t have corn, we can’t have powdered sugar. But my blendtec powdered raw turbinado and I added about 1 tablespoon of potato starch for each cup of sugar. I used SO delicious coconut creamer, and coconut butter for the frosting.
    This is rich and decadent, and now my daughter can have cake!
    I’ll try scaling back on the turbinado in future occasions. We don’t sweeten our foods, and this recipe was so very sweet and fudgey. I think our family could manage half the amount of sugar. Extended family? Had no idea!
    I will add for readers that the texture for me was very dense and fudgey, similar to brownies or flourless cakes. This cake is undoubtedly no Duncan Hines fluffy boxed cake. But so much better!

  27. Toyin says


    I will like to follow this recipe for 6 cupcakes, is this possible or am I to look out for a different recipe.
    I am making this for my daughter and some other kids in school with allergies for a cupcake sale day.
    Please help!!!

    • says

      Toyin, the recipe will yield 24 cupcakes. The cupcakes taste really good so even kids without food allergies will like them. If you wish to halve the recipe, it’s up to you. I have not tried making in a smaller batch.

      • Toyin says

        Thanks, I halved the recipe and got 14 cupcakes but it didn’t turn out nice. Today, I went for a Quarter with a little more liquid and stirring for a little longer to ensure the mixture was very smooth and it turned out really nice.

        Thanks for this recipe,

        how can I adapt it to make a different type of cupcake?

        • says

          Toyin, this recipe is not an “adaptable” recipe to make yellow cupcakes, etc. it was specifically developed to be a chocolate birthday cake/cupcakes.

  28. Sangeeta says

    Hey Laura,
    I loved this recipe- finally I found an eggless cake which is neither dry nor oily- just perfect! Since I had no apple cider vinegar at hand, I substituted it with the same quantity of plain yoghurt. Also this quantity yields 24 cupcakes… Was loved by the kids n adults alike. Will certainly recommend to all!:)) Sangeeta

  29. alisha says

    Hi I was just wondering I wanna make this cake.
    can I get all these ingredients in australia
    or are they called something else

    • says

      great question! we have a post coming up that will answer just that! feel free to subscribe to our newsletter so you get it delivered to your inbox. :)

      • marlene says

        I was excited to try this recipe. I could not find chocolate coconut milk, so i used
        chocolate rice milk, and my cake sunk in the middle and I never could get it done.
        i read several reviews and found no one else with this problem I didnt alter the recipe in any way. Any ideas about what I may have done wrong?

  30. Stephanie says

    My daughter and I are currently gluten and dairy free. It’s her 2nd birthday at the end of the month and I’d like to try this recipe. I live in Scotland and don’t have access to the King Arthur flour. Do you know anything about Doves flour? Is it any good? Also, for the coconut milk, do you mean coconut milk in a can, that is quite thick, for cooking curries, or the stuff that is mixed with sugar, etc as a milk substitute drink? I’d like to know this for both the cake and the frosting please! I’m not much of a baker – I hope I can do this cake justice!

  31. Hannah says

    This sounds perfect for my son’s 2nd birthday coming up. But I am wondering if I can use regular chocolate milk? He is gluten and egg free but not dairy free. Thanks.

  32. Saffy says

    Hi! I want to make this cake but I also want to use agave nectar instead of sugar, do you think this will work or have you tried it before? Thanks!

  33. says

    Thanks for the cake recipe! I made it into cupcake form, replacing the cane sugar with coconut sugar to make them allergen-free for my daughter. I also replaced the chocolate non-dairy milk with organic rice milk and then as it needed more sweetness, added 1/4 cup of pure maple syrup. They turned out great! She was able to enjoy her own cupcake treat for the kindergartner’s teddy bear’s picnic :)

  34. Anne says

    I’m glad to find ur website. Made this cake (half recipe In a round pan) today, came out really moist and tasty.I did some adjustments :instead of Choco milk, reg sugar , apple cider vinegar I’ve used plain soy milk , organic cane sugar, rice vinegar and my flour blend is:1/2 c brown rice flour 1/2 c white rice flour 1/2 c potato starch,1/4 c tapioca starch/flour.thank you .

  35. Natalie says

    You said coconut milk would be a good replacement for the creamer. What about the non-dairy chocolate milk?

  36. Dulce says

    I’m new at this new way of life. My son is intolerant/allergic to gluten, dairy, egg and chicken. He will be turning one year in November so I’m trying all the chocolate cake recipes I find. I fell in love with picture of this cake and I tried so enthusiastically to make it but it turned out horribly!
    I think that I shouldn’t have substituted the vegetable oil for coconut oil, that’s the only thing I changed! Please help

    • says

      Dulce, Baking soda. Bad baking soda (over exposed to air) will ruin this recipe. Also the type of GF flour used. All GF flours are Not all created equal. Check out the ones we recommend in the pantry section here.

      • Dulce says

        So The substitution for coconut oil is ok? So that when I make it again I can consider using it again…… How should I store my baking soda to prevent it from going “bad”?

        • says

          In the United States, most baking sodas have expiration dates (best by dates). Once opened, about 3 months.

          Baking soda needs an acid to get a reaction, so use the same method as for baking powder but add 1/4 teaspoon of vinegar to the water before water before adding the soda. As before, if it bubbles up, your soda is fine to use.

          If you don’t see bubbles, then sadly, you’ll need to take a trip to the store and buy a fresh box! If there isn’t much fizzing, your ingredients are likely on their way out. You can probably still use them to get some lift, but your baked goods will be more dense that usual. Don’t be tempted to double the amount of baking soda or powder – that would make your food taste seriously strange!

  37. Lisa says

    What GF AP flour do you use? I currently have one that’s a mixture of brown rice, white rice flours with potato and corn starch. Do you make your own GF AP flour or do you buy it pre-made?

  38. says

    Do you think I could directly substitute regular all-purpose flour for the gf flour? I am not trying to avoid gluten, just dairy.

  39. Donna Karson says

    Oh Momables…so glad to discover you. I’m not good at converting recipes, just making them! I’m thrilled to be trying your Morning Glory Muffins and then chocolate cake this week. Keep them coming.

  40. Michael Stoddard says

    Please be aware that If making this recipe for someone with a milk allergy that “non-dairy” products, particularly creamer, actually can contain milk protein.