Learn how to bake the best and most moist gluten-free chocolate cake with this an easy to follow, no fail recipe! What makes the cake so moist? Boiling water in the cake batter! Boiling water helps saturate the starches, aerates the batter, making the cake light, fluffy and moist instead of gritty. This two-layer cake uses 9” round cake pans and is ready in 40 minutes. Yields 12 servings.

Best Gluten-Free Chocolate Cake REcipe
Whether you are new to gluten-free baking or a seasoned veteran, we all need need an easy, homemade gluten-free chocolate cake recipe that fools even the toughest critics. Every time I serve it, no one suspects anything but an old fashioned, moist, from scratch recipe.
I’ve made it as a gluten-free birthday cake, for celebrations, and as a base for many other creations in my gluten-free cake collection, like Ding Dong cake or Gluten-free Ice Cream Cake.
It’s my most often made dessert because it’s quick to throw together and consistently turns out fabulous. So what’s the trick? Why does this chocolate cake made with cocoa powder beat out the rest?
First, the recipe uses commonly stocked pantry items, like gluten-free all purpose flour, unsweetened cocoa powder, eggs, milk (or dairy-free), and vanilla. Since it uses oil rather than butter, not only can it be easily adapted to a dairy-free gluten-free recipe, but the crumb stays moist.
Second, it’s just as easy as using a cake mix with even better results! Simply dump all the ingredients in, mix, and bake. It’s impossible to mess up this gluten-free chocolate cake!
Lastly, it uses a magical special ingredient to give superior results. Boiling water helps saturate the gluten-free starches, eliminating any grittiness, activates the chocolate for a rich, deep flavor, and aerates the batter. Once the hot water mixes in with the cake batter, it jump starts the baking powder and baking soda for an extra fluffy texture.
Some cake recipes rely on sour cream for extra moisture, like gluten-free chocolate bundt cake, which creates a traditional denser bundt cake crumb. Almond flour chocolate cake gets its moistness from the natural oils in almonds.
But when making a chocolate cake with all-purpose gluten-free flour it’s as simple as adding a cup of hot boiling water!
Read on to learn how to make the best gluten-free chocolate cake, with bakers tips, workable ingredient swaps, and variations for sheet cake, cupcakes, and dairy-free. It’s all here!
Ingredient notes
The cake ingredients are simple, with the only speciality item required being gluten-free flour.
- Gluten-Free Flour – I use and recommend Cup4Cup gluten-free flour blend, which contains xanthan gum. For a dairy-free cake, use King Arthur Measure-for-Measure gluten-free flour or your preferred brand.
- Unsweetened cocoa powder – Use regular or Dutch-processed cocoa for richer chocolate taste.
- Milk – Use regular or any preferred non-dairy milk, such as almond milk.
- Vegetable oil – Coconut oil or any preferred oil may be substituted.
- Boiling water – Secret “ingredient” for a moist, deceptively gluten-free cake! It helps saturate the starches, aerates the batter, making the cake light and fluffy instead of gritty. This technique is also used when making gluten-free whoopie pies.
How to Make Gluten-Free Chocolate Cake
(Below shows step-by-step photos and modified instructions. For the complete recipe, along with ingredient amounts, scroll down to the recipe card.)
- Preheat the oven to 350º F. Prepare two 9-inch round cake pans by spraying with cooking spray, lining pans with cut-to-size parchment on bottom, and then spraying the parchment. This helps the cakes easily release from the pans. Below I have also listed alternative size baking pans that may be used.
- In a large mixing bowl combine the dry ingredients – flour, sugar, cocoa, baking powder, baking soda, and salt on low speed.
- Add the wet ingredients – regular or dairy-free milk, oil, eggs, and vanilla to flour mixture. Mix on medium speed until well combined.
- Reduce the speed to low and slowly add boiling water to the cake batter. Once the water is mixed in, increase to high speed and mix for 1 minute. This helps aerate the batter and make the cake light and fluffy.
- Pour the cake batter into the prepared cake pans. Bake for 30-35 minutes, until a toothpick inserted in the center comes out clean.
- Remove from the oven and cool in pans for 10 minutes. Turn cakes onto wire rack to cool completely before frosting with one of the recipes below.
Recommended Chocolate Cake Frostings
Once you’ve made your homemade chocolate cake, let it cool completely before frosting. Below are my favorite frosting recipes to pair with it, but of course it also tastes great with a simply dusting of powdered sugar!
- Fluffy Buttercream Frosting – either vanilla or chocolate frosting
- Whipped Cream Frosting – regular or chocolate whipped cream frosting
- Chocolate Ganache
- Peanut Butter Glaze
- Cream Cheese Frosting
Best Gluten-Free Flour To Use
Gluten-free baking flour blends have come a long way in the last ten years. Gluten-free baking used to mean buying, storing, and measuring several different flours to make your own flour mix.
Fortunately there are several commercial brands that perform way better than any homemade mixes I’ve ever experimented with. Below are the most common brands I’ve tested for website recipes, gluten-free cakes, and when working on my gluten-free cookbook.
Cup4Cup Gluten Free Flour is the brand I primarily use because any gluten-free taste or difference in texture is undetectable. However, it contains milk powder, so it is not dairy-free.
King Arthur’s Measure-for-Measure has preformed well in my baking tests, is affordable, and does not contain allergens. However, I still detect slightly grittier texture.
Bob’s Red Mill is widely available and affordable, but has an unpleasant aftertaste and gritty texture, especially in gluten-free pastries or cookies.
Do I Need To Add Xanthan Gum?
No, not if the gluten free-flour blend contains it. All three flours mentioned above do have xanthan gum in the mix.
Please note King Arthur has two variations of GF flour. King Arthur’s all-purpose gluten-free flour does not contain xanthan gum, so 1 teaspoon will have to added to the dry ingredients.
King Arthur Measure-for-Measure Gluten-Free Flour does contain the xanthan gum already, so there’s no need to add extra.
expert Tips for a moist Gluten-Free Cake
- Use cake baking strips to not only keep the cake moist, but they prevent uneven layers, which can be tricky to frost and hold shape.
- The less sugar you use, the drier the cake will be. Please note while the amount of sugar may be reduced, it will dry out the cake slightly.
- For the most accurate measurement, spoon the flour into the measuring cups instead of dipping cups into the bag. Using more flour, even by a tablespoon or two, dries out the cake.
- Generally using oil in cakes versus butter makes them more moist.
- This cake recipe is more forgiving when it comes to baking time, but you still don’t want to overbake. Check by inserting a toothpick into the middle. It should have some moist crumbs, without being liquidy. If you are unsure, turn off the oven and let the cake sit for 1-2 minutes before removing.
- Enjoy the cake at room temperature. Although some frostings have to refrigerated, I highly recommend setting cakes out for several hours before serving to reach room temp. Gluten-free cakes especially have a tendency to dry out in the refrigerator.
Using Different Baking Pans
If you like to experiment with using different size cake pans, or make cupcakes instead of a layer cake, follow these adaptations:
Gluten-Free Cupcakes
To make bake this cake as cupcakes follow Incredible Gluten-Free Chocolate Cupcakes recipe.
Making a 9X13 Sheet Cake
To make a sheet cake instead of layer cake make the batter as written. Spray a 9X13 baking pan and bake at 350 for 45-50 minutes or until toothpick inserted in middle comes clean. Cool on wire rack completely before frosting.
Freezing and Storing
Gluten-free cakes do not stay fresh as long as regular cakes. Therefore, if you don’t plan on freezing the cake, make it no more than 24 hours ahead of time.
Frequently I bake the cake layers and freeze them until ready to assemble with a filling and frosting. Alternatively, the cake may be baked, frosted, and frozen whole.
Freezing Unfrosted Cake Layers: Wrap each completely cooled layer securely in plastic wrap. Transfer wrapped layer to a gallon freezer bag and freeze up to 3 months.
When ready to use, remove from freezer bag and thaw wrapped cake at room temperature for 1 hour.
Freezing Frosted Cake: Assemble the cake with filling and frosting. Transfer whole cake to the freezer so frosting solidifies. After the frosting is frozen, wrap the cake securely with plastic wrap. Cover plastic wrap with foil and freeze up to 3 months.
Thaw cake overnight in refrigerator. Carefully remove plastic wrap and foil. Continue to thaw at room temperature for 5-6 hours.
Freezing Cake Slices:
I often do this to save myself from eating a whole cake! Slice the leftover cake in serving sized portions. Wrap each piece in plastic wrap and freeze in a single layer on a baking sheet. Once the pieces are solid, transfer slices to a gallon freezer bag or airtight container.
Thaw pieces on the counter for 1 hour or defrost in the microwave at 20% power, carefully avoiding overheating and melting the frosting.
Dairy-Free Adaptations
If you are looking for a dairy-free gluten-free chocolate cake recipe it only requires one easy modification. Replace the milk with a non-dairy milk, such as almond milk, soy milk, or coconut milk.
The recommended flour, Cup4Cup, does contain milk powder, so King Arthur Measure-for-Measure gluten-free flour is recommended instead.
Click here to see the
step-by-step web story instructions for this recipe!
SAVE THIS recipe for Moist GLUTEN-FREE CHOCOLATE CAKE TO YOUR PINTEREST BOARD!
Let’s be friends on Pinterest! I’m always sharing great recipes!
Moist Gluten-Free Chocolate Cake (One Bowl!)
Listen to Recipe Audio
Ingredients
- 2 cup all purpose gluten-free flour (I highly recommend Cup4Cup gluten free flour but see recipe notes for dairy-free)
- 2 cups granulated sugar
- ¾ cup unsweetened baking cocoa
- 2 teaspoons baking powder
- 1 ½ teaspoons baking soda
- 1 teaspoon salt
- 1 cup milk or non-dairy milk
- ½ cup vegetable, canola, or coconut oil
- 2 eggs
- 2 teaspoons vanilla extract
- 1 cup boiling water
Instructions
- Preheat oven to 350º F. Prepare two 9-inch cake pans by spraying with cooking spray, lining pans with cut-to-size parchment on bottom, and then spraying the parchment. Set aside.
- In a large bowl add flour, sugar, cocoa, baking powder, baking soda, and salt. Whisk to combine or, using your paddle attachment on stand mixer, mix until combined.2 cup all purpose gluten-free flour,2 cups granulated sugar,¾ cup unsweetened baking cocoa,2 teaspoons baking powder,1 ½ teaspoons baking soda,1 teaspoon salt
- Add milk, oil, eggs, and vanilla to flour mixture. Mix on medium speed until well combined. Reduce speed to low and slowly add boiling water to the cake batter. Once the water is mixed in, increase to high speed and mix for 1 minute.1 cup milk or non-dairy milk,½ cup vegetable, canola, or coconut oil,2 eggs,2 teaspoons vanilla extract,1 cup boiling water
- Distribute cake batter evenly between the two prepared cake pans. Bake for 30-35 minutes, until a toothpick inserted in the center comes out clean.
- Remove from the oven and cool in pans for 10 minutes. Turn cakes onto wire rack to cool completely before frosting with fluffy vanilla or chocolate buttercream.
- DID YOU MAKE THIS RECIPE?? DON'T FORGET TO LEAVE FEEDBACK AND RATE BELOW!
Recipe Notes
Dairy-Free Chocolate Cake
The only recipe adaptation you’ll have to make is replacing the milk with a dairy free milk, such as almond milk, soy milk, or coconut milk. If you prefer using coconut oil, that may also replace the vegetable oil. The recommended flour, Cup4Cup, does contain milk powder, so King Arthur Measure-for-Measure gluten-free flour is recommended instead.Using Different Baking Pans
Gluten Free Cupcakes To make bake this cake as cupcakes follow Incredible Gluten Free Chocolate Cupcakes recipe. 9X13 Sheet Cake To make a sheet cake instead of layer cake make the batter as written. Spray a 9X13 baking pan and bake at 350 for 45-50 minutes or until toothpick inserted in middle comes clean. Cool on wire rack completely before frosting.Freezing / Storing
Gluten free cakes do not stay fresh as long as regular cakes. Therefore, if you don’t plan on freezing the cake, make it no more than 24 hours ahead of time. Freezing Unfrosted Cake Layers: Wrap each completely cooled layer securely in plastic wrap. Transfer wrapped layer to a gallon freezer bag and freeze up to 3 months. When ready to use, remove from freezer bag and thaw wrapped cake at room temperature for 1 hour. Freezing Frosted Cake: Assemble the cake with filling and frosting. Transfer whole cake to the freezer so frosting solidifies. After the frosting is frozen, wrap the cake securely with plastic wrap. Cover plastic wrap with foil and freeze up to 3 months. Thaw cake overnight in refrigerator. Carefully remove plastic wrap and foil. Continue to thaw at room temperature for 5-6 hours. Freezing Cake Slices: Slice the leftover cake in serving sized portions. Wrap each piece in plastic wrap and freeze in a single layer on a baking sheet. Once the pieces are solid, transfer slices to a gallon freezer bag or airtight container. Thaw pieces on the counter for 1 hour or defrost in the microwave at 20% power, carefully avoiding overheating and melting the frosting. Adapted from Add a PinchNutrition
This post contains affiliate links. My opinions are always my own. If you purchase a product through an affiliate link, I make a small commission – at no cost to you. Read full disclosure policy here.
Cindy Pebley-Brennsteiner says
This recipe made the most amazingly moist gluten free cake that I have ever tasted! I have made it many times with both chocolate and banana frosting. Thank you for the recipe!
Melissa Erdelac says
Yum! Would love to try it with banana frosting!! Looking that up!
Best,
Melissa
Stephanie says
My mom has Celiac and she asked me to make her a birthday cake… I didn’t want to buy the box GF cakes because they taste Gluten free.. this cake was super easy, VERY moist, and it tasted delicious!! I will definitely be making this again for her everyone loved it!!
Melissa Erdelac says
Yay! Love this so much! Thank you so much and happy birthday to your mom!
Best,
Melissa
KatieJane says
Definitely tasty, moist and chocolatey. The only issue we had was the batter was exceptionally sticky (it kept crawling up the beaters and almost right into the inner workings of the hand mixer) and then once cooked, it was very spongy and somewhat sticky. Delicious! But hard to cut without the knife dragging it apart.
Melissa Erdelac says
Hi Katie Jane,
I’m glad you liked the taste! I’m guessing you used Cup4Cup flour, which contains a lot of cornstarch. It’s a little tougher to work with using a hand mixer versus a stand mixer with a paddle attachment. The batter can be very deceiving for how it turns out after it is baked!
Best,
Melissa
Aubree says
I accidentally filled two 8 inch pans and got worried they wouldn’t cook right so I split the batter into a third 8 inch pan. I cooked for 25 minutes and checked and the toothpick came out with only some moist crumbs. However, the cake was super moist, almost wet, on the tops and bottom (I can definitely see why someone had an issue with the cake sticking to their cooling rack). Once cooled, I leveled them and tested the cake—good flavor but quite stodgy, not airy or light. Is that normal? I’m paranoid they’re not cooked but the toothpick came out ok and the texture *looks* cooked like yours.
Melissa Erdelac says
Hi Aubree,
Hmm, it sounds like they are underbaked. With GF baking, I usually bake a few minutes longer because it takes longer for the moisture to evaporate. I’m also wondering what GF flour you used?
Best,
Melissa
Anonymous says
I used King Arthur Measure for Measure. I already cooled and froze the layers so I guess I’ll have to remake it. Thanks!
Michelle Becher says
Fantastic!! The best recipe yet!! Thank you!! I wish I could post a picture😀🎂
Melissa Erdelac says
Thank you, Michelle! You can always tag me on Instagram too! I’m so glad you enjoyed the recipe.
Best,
Melissa
Ashley says
When I turn my cakes onto the cooling rack, it sticks. I’ve tried spraying the rack with cooking spray and that seemed to make it worse. What am I doing wrong?
Melissa Erdelac says
Hi Ashley,
When you cut into the cake it is cooked? I do find it sticks slightly to my cooling racks, but nothing that would destroy the cake. Perhaps it would help if you had the type of cooling racks that have a nonstick finish? Sorry this happen. Definitely sounds frustrating!
Best,
Melissa
Anonymous says
My brother in law said it’s the best he’s ever tasted. He said that he has been waiting a long time for great cake!!
Melissa Erdelac says
I love this! Thank you so much for sharing!
Best,
Melissa
Ashley says
I followed the directions to make the 9×13 sheet cake and I am slightly confused as to why all of the ingredients were halved. The result was delicious, just very thin. They resembled a brownie instead of a cake. Did something go wrong, or is it safe to say you can follow the full recipe in a 9×13 pan? Thanks!
Melissa Erdelac says
Hi Ashley,
I’m really sorry about this! You are absolutely right, it should be a full ingredients for a 9X13. I’m sorry this got transcribed wrong, but it is all fixed now. I hope you will give it another go and I appreciate you taking the time to write!
Best,
Melissa
Anonymous says
It was still delicious and my son actually really liked the thinness of the cake layer lol! So this “mistake” may just be the way I make it lol!
Rebecca says
Hi! I had to make this cake 2 days in advance, I don’t want to freeze it… can I just put it in the fridge? I plan on decorating it the night before the birthday. Will that work? Thanks!
Melissa Erdelac says
Hi Rebecca,
I would just wrap it in plastic wrap and leave it at room temperature. Putting it in the fridge will dry it out.
Best,
Melissa
Christina Maffia says
This cake was DELICIOUS! No one knew it was GF and everyone loved it even my 8 year old granddaughter who doesn’t like chocolate but ate 2 pieces!
I made it in a sheet pan and frosted with your peanut butter frosting. Such a big hit! Thank you!
Melissa Erdelac says
Thank you so much, Christina! I really appreciate you taking the time to let me know!
Best,
Melissa
Amanda says
Rich chocolate with a beautiful crumb! You’d never know it’s GF!!! Moist & doesn’t fall apart like so many GF cake recipes.
Melissa says
Thank you for sharing, Amanda! I’m glad you enjoyed the recipe 🙂
Best,
Melissa
Kelsey says
I made this yesterday and after I poured the water in it was more of a liquid batter. I wanted to be sure I didn’t miss something or if this is how it is supposed to be. I did have to use a *egg replacer*? It cooked well besides the edges being a little hard, I did add a tbsp of flour in to help thicken it up a little. The taste of it was great though!
Thanks!
Melissa says
Hi Kelsey,
The egg replacer would definitely attribute to this and possibly the brand of GF flour you used. I’m glad it was still delicious, though!
Best,
Melissa
Christine Savinelli says
Made this cake yesterday for my daughters 24th Birthday & everyone liked it, I did a butter cream frosting with Almond Milk. I definitely will be making this cake again. When your Gluten Free & you enjoy cakes once in awhile, this will probably be my go to recipe if they like chocolate. Thanks for sharing this recipe.
Cindy Bodart says
You won’t believe this cake is gluten free! Everyone loved it and couldn’t believe it was gluten free! This will be my go to cake when I need a delicious GF chocolate cake.
Melissa says
Yay! Thank you so much for sharing, Cindy.
Best,
Melissa
Anonymous says
its amazing i can finally make my mom cake
Melissa says
Thank you! Love this!
Robin Pfohl says
Can you make this with a sugar substitute?
Melissa says
Hi Robin,
I haven’t tried it with a sugar substitute, but if you’ve had success with other cakes, I don’t see why this one wouldn’t work.
Best,
Melissa
GINGER says
Could you use oat flour instead? If so, how much?
Melissa says
Hi Ginger,
No, I don’t think it would work with straight oat flour, but you might be more successful with a combination of GF flours. I haven’t tested with the recipe with anything but all purpose gluten free flour, though.
Best,
Melissa
Ginger says
Okay, I think I’ll attempt it but will also add some cornstarch to provide additional fluffiness to the cake as using just oat flour may make too dense of a cake. I’ll let you know how it turns out!
Erica says
This was the best cake I’ve ever made. Thank you! I baked in three 8” layers because that’s what I had, and shortened the cooking time to 22 mins. So delicious! I paired it with a Swiss merengue buttercream.
Melissa says
Thank you, Erica! That sounds like one fantastic cake!
Best,
Melissa
Joy L says
I just made this cake and OMG!!!! It is the BEST I have ever made!! The taste and texture are perfect!!! Highly recommend!!
Melissa says
Hi Joy,
I’m so glad! Thanks for taking a moment to share!
Best,
Melissa
Staci says
This is not just the best gluten free chocolate cake, it is the best chocolate cake! And, love that it tastes great with a pre-made flour blend, so simple and fast! I used Bobs Red Mill, if it tastes even better with Cup for Cup, can’t wait to try it.
Melissa says
Hi Staci,
Yay, big with for gluten free! I’m so glad you love the cake as much as I do!
Best,
Melissa
Andrea says
This cake is the best Gluten free cake I have ever tried. It is so moist and delicious. We live in higher altitude, so I had to cook longer, but it came out amazing!
Melissa says
Hi Andrea,
So glad to hear! I’m glad you were able to adapt it for higher altitude. Having used to do this myself, I know it can definitely add another baking challenge!
Best,
Melissa
Megan D. says
Best GF cake EVER! I cannot believe how moist it is! Thank you for sharing!!!
Melissa says
Oh, thanks so much, Megan! I’m so happy you found your forever recipe!
Best,
Melissa
Jamie says
I made this with strawberry slices and chocolate cream cheese frosting… ummmm yes!!! So good! Attempting a regular flour version today.
Melissa says
Hi Jamie,
I’m so glad! Thank you so much for taking the time to let me know. That version sounds absolutely amazing!
Best,
Melissa
Dana says
Could you use butter instead of oil?
Melissa says
Hi Dana,
I haven’t tried it with butter, but I don’t think it would be a problem. Cream it with the sugar and then add the remaining ingredients. Let me know how it works out!
Best,
Melissa
Cathy Nichols says
Hi, I have loved all of your recipes and appreciate your efforts and sharing. My chocolate cake was a bit rubbery and gummy. Any idea what I did wrong.
Thanks Again,
Cathy
Melissa says
Hi Cathy,
I’m really sorry to hear that! It could be either the flour you used (some have a tendency to be gummy) or it did not bake long enough. Gluten free baked goods need a little longer for the moisture to evaporate so I usually have a tendency to overbake versus regular flour where you want to pull out as soon as it’s done.
Let me know if you have any follow up questions!
Best,
Melissa
Cathy Nichols says
Thanks so much for the quick reply!
Peg says
I just made this cake and it is delicious! I used Cup4Cup, and I also used allulose as the sweetener because we are sugar free as well. It is so light and fluffy, not dense at all. Peanut butter cream cheese frosting makes it perfection. Definitely a keeper. Thank you!
Melissa says
Hi Peg,
I’m so happy this cake works just as well in a sugar free version. Peanut butter frosting on it sounds absolutely divine! Thanks for taking the time to write.
Best,
Melissa
Debi says
Thank you for posting this delicious recipe!! It was truly yummy, this cake recipe made my son’s birthday celebration even more special! ♥️♥️♥️♥️♥️
Melissa says
Hi Debi,
Yay! I’m so glad the recipe made your son’s birthday special. Thank you so much for taking the time to write. I appreciate it!
Best,
Melissa
Mari says
Best gluten free chocolate cake ever. I followed recipe to the dot. I’m in love. My daughter loved it and the one that is not gluten free also loved it. My husband too!!! It is a keeper. Thank you so much!!!!
Melissa says
Hi Mari,
This is fantastic! I’m so happy you were able to find a recipe to please all! I appreciate you taking a moment to write.
Best,
Melissa
Roz says
Best chocolate cake I have had since starting my GF journey! Definitely a keeper! I liked it so much that I will be trying some of the other cakes too!
Melissa says
Hi Roz,
I’m so happy this cake was such a hit! I’ve turned this chocolate cake into so many versions over the years, it is definitely a tried and true recipe.
Best,
Melissa
Audrey says
It is the best cake I have ever tasted!! I totally recommend it, especially with the butter cream icing.
Melissa says
Hi Audrey,
This makes me beyond happy! Thank you so much for taking the time to let me know how much you enjoyed it. 🙂
Best,
Melissa
Christine says
My 12 year old daughter made this cake for us. It was delicious and easy enough for her to do by herself! Made even better with peanut butter buttercream and chocolate ganache. Definitely a keeper.
Melissa says
How great for her! That cake sounds absolutely amazing. I wish I had a piece of it right now…
Best,
Melissa