The BEST gluten-free chocolate cake recipe, bar none. With a thick swirl of chocolate buttercream and festive sprinkles, this is the perfect gluten-free chocolate birthday cake. Bake it as a sheet cake, layer cake, or cupcakes!

We're very mindful about letting Zoella (age 3) eat chocolate. We held off as long as we could and when I first gave her a taste, I thought she'd find it too bitter like I did as a kid, but that's not the case. I even offered her a tiny piece of 90% extremely dark chocolate, but even that didn't deter her. Now, she's a chocolate bloodhound. If ever I sneak a bite of chocolate, she knows.
Her: *sniff sniff* "I smell something."
Me: "I just ate some _____(insert blatant lie)."
Her: "I smell chocolate."
(Damn it). Now I know why my friend Emily texts me from the pantry floor where she hides from her kid to eat candy bars.
For her third birthday, she requested a "chocolate and vanilla cake with rainbow frosting" every day for a month. That's exactly what I made as a four-layer cake, but when all 42 guests confirmed yes for her birthday party, I panicked and also made this gluten-free chocolate sheet cake at the 11th hour.
I started with my favorite gluten-free chocolate layer cake recipe as a base. Except I hadn't tested it as a sheet cake, so it came out too thin with not enough batter for the size of the pan. I panicked again and made another sheet pan of cake, stacking them together with a generous layer of chocolate buttercream between. I now had enough cake to feed an army.
The best gluten-free chocolate cake
This gluten-free chocolate cake is so good that even with 2-3 servings per guest (including toddlers and newborns) almost all of it was gone by evening and we polished off the rest for breakfast.
With a thick swirl of chocolate buttercream and plenty of festive sprinkles, this version is the perfect gluten-free chocolate birthday cake. No fussing with layers, crumb coats, or piping frosting. Just dump it in the pan, bake it, cool, then slather it in frosting.
Don't forget to lick the spatula.
This cake is the best gluten-free chocolate cake recipe, bar none. I'd go so far as to call it the best chocolate cake ever as well. I've made it over 200 times, for every occasion: birthdays, baby showers, Valentines' Day, Father's day, dinner parties, I-just-need-cake days (you celebrate that too?). And every time, people ask for the recipe and no one suspects it's gluten-free.
If you're new to baking gluten-free and want a foolproof recipe that will blow people away, start with this cake, in any form.
Gluten-free buttercream frosting
I've topped this cake with a creamy chocolate buttercream frosting that accentuates the classic chocolate cake flavor. A bit of milk or heavy cream keeps the frosting soft and smooth - perfect for spatula swirls.
I always add a bit of chocolate extract to my chocolate desserts to boost the flavor, but if you don't have any, just sub in more vanilla extract.
How to make moist gluten-free chocolate cake
The great thing about this chocolate cake is that it doesn't dry out quickly. With oil as the fat, this cake is light and fluffy with a moist chewy crumb. Even in the oven, it's incredibly forgiving. When testing it with a toothpick, err on the side of just a little bit longer. To this day, have never accidentally over-baked it.
It'll last for several days sealed in an airtight container - even with the frosting. Or, if you're planning ahead, you can store the cake right in the sheet pan with a layer of plastic wrap or bee's wrap overnight and frost the cake just in time for your party.
Convert the recipe Gluten-Free Chocolate Layer Cake or Gluten-Free Chocolate Cupcakes?
I've shared the base of this cake as a gluten-free chocolate layer cake and as gluten-free chocolate cupcakes, adapted now as a sheet cake.
To save you the trouble, here's how you'd convert this gluten-free chocolate sheet cake into a layer cake or cupcakes. The same exact batter quantity below makes:
- 1 9x13 cake - bake for 45-55 minutes
- 3 8-inch layer cakes - bake for 33-37 minutes
- 36 cupcakes - bake for 18-22 minutes
Whatever form you prefer, this will become your go-to chocolate cake recipe!
To adjust the recipe to make different quantities, scale all the ingredients to 1, 2, or 3 eggs. I've got a post with each scaled version below to save you the trouble. Here's what scaling the recipe down gets you:
Dairy-Free Gluten-Free Chocolate Cupcakes
This sheet cake is easy to make dairy-free. Use dairy-free milk, such as oat milk or almond milk for the batter. The results are identical to those with whole milk.
For the chocolate buttercream, use a stick plant butter and dairy-free milk You'll need a bit less milk for the frosting, as plant butter tends to be a bit softer, so start with just 1 tablespoon, adding more as needed.
Vegan Gluten-Free Chocolate Cake
To make this sheet cake vegan, simply follow the dairy-free option above, using plant milk in the batter and plant butter in the frosting, and replace the eggs with aquafaba (the liquid in a can of chickpeas). For each egg, replace it with ¼ cup aquafaba (¾ cup total).
Extend the bake time by 5-10 minutes, checking for doneness with a toothpick.
More Gluten-Free Cake Recipes
- Gluten-Free Lemon Cupcakes
- Gluten-Free Vanilla Raspberry Cake
- Chestnut Plum Upside-Down Cake
- Spiced Banana Date Cake
Recipe
Best Moist Gluten-Free Chocolate Sheet Cake
Ingredients
- Scant 1 cup milk (1 cup minus 1 tablespoon), or equivalent in buttermilk and skip the vinegar
- 1 tablespoon white vinegar
- 168 g (1 cup + 1 tablespoon) sweet rice flour, also called Mochiko - different from "white rice flour" or "brown rice flour"
- 99 g (¾ cup + 2½ tablespoons) gluten-free oat flour
- 84 g (½ cup + 1 tablespoon) millet flour
- 128 g (1 cup + 3 tablespoons) unsweetened Dutch-processed cocoa powder, sifted (I use Rodelle Organic Cocoa)
- 503 g (2¼ cups + 3 tablespoons) granulated sugar
- 2¼ teaspoons baking powder
- ¾ teaspoons baking soda
- 1½ teaspoon kosher salt
- 3 large eggs, room temperature (see vegan option below)
- 4½ tablespoons neutral vegetable oil, such as safflower, sunflower, or canola oil
- 1½ teaspoon pure vanilla extract
- ¾ teaspoon chocolate extract, or ¾ teaspoon more vanilla extract (I use Rodelle chocolate extract)
- 1 cup hot water
- 1½ cups (12 oz) unsalted butter, just about room temperature 60-70°F
- 4½ cups (540 g) powdered sugar
- ¾ cup (81 g) unsweetened Dutch-processed cocoa powder, sifted
- ½ teaspoon kosher salt
- 2½ teaspoons pure vanilla extract
- ¾ teaspoon chocolate extract, or ¾ teaspoon more vanilla extract
- 3-4 tablespoons whole milk or heavy cream, dairy or non-dairy
- Optional: Festive sprinkles
INSTRUCTIONS
- Preheat the oven to 350°F. Prepare a 9x13 cake pan by lightly oiling it, and lining it with parchment paper. See notes for converting to cupcakes or a layer cake.
- If not using buttermilk, combine the milk and vinegar in a small cup and let sit while you measure the flour, at least 5 minutes.
- In a large bowl, sift together the sweet rice flour, oat flour, millet flour, cocoa powder, sugar, baking powder, baking soda, and salt.
- In the measuring cup, whisk the milk and vinegar mixture with the egg, oil, vanilla extract, and chocolate extract until smooth. Pour this mixture into the dry ingredients and stir lightly. Pour the hot water into the dry ingredients and mix until completely smooth, scraping up the sides and bottom to completely incorporate.
- Pour the batter into the prepared cake pan and bake for about 45-55 minutes, or until a toothpick inserted in the center comes out clean or with just a few moist crumbs and the center bounces back when poked. In my experience, it's best to err on the side of an extra minute or two to be sure - this cake is very moist and won't over-bake very easily.
- Let cool in the pan for 10 minutes, then overturn the cake onto a wire rack to cool completely. To do this, I place a large sheet pan over the baking pan and, holding it together, carefully flip the cake to release. Peel off the parchment paper, then place a wire rack over the top, and carefully flip right side up.
- While the cake cools completely, prepare the frosting. In the bowl of a stand mixer fitted with the paddle attachment, cream the butter over medium speed.
- Sift together the powdered sugar, cocoa powder, and salt. Slowly add this to the butter, in 4 batches, beating until incorporated. Add the vanilla and chocolate extracts and mix until smooth. Add the milk or cream, starting with just 2 tablespoons and adding additional milk or cream as needed, until frosting is smooth and spreadable. It should be somewhat glossy, but still hold swirls.
- When the cake has cooled, swirl the buttercream over the top of the cake (I recommend using the back of a soup spoon) and top with colorful sprinkles, if desired. Slice into 24 pieces and devour.
Notes
Different size cakes or cupcakes
The same exact batter quantity in this recipe makes:- 1 9x13 cake - bake for 45-55 minutes
- 3 8-inch layer cakes - bake for 33-37 minutes
- 36 cupcakes - bake for 18-22 minutes
- 1 egg version = 12 cupcakes OR one 8-inch round
- 2 eggs version = 24 cupcakes OR two 8-inch rounds OR three 6-inch rounds
Trisha -
This smells so yummy. My cake did fall in the middle and the edges got “burnt” looking when I checked it at 45 min. It was just barely done at that time with the toothpick test. The only sub I made was brown rice for the millet flour, my daughter can’t have that. Should I turn the oven down and cook longer?
Sarah Menanix -
Hmm - I've never had that happen before! I haven't tried subbing brown rice flour for the millet flour, so I wonder if that could have caused the issue. Did you use sweet rice flour or mochiko (versus white rice flour) and did you measure the flours by weight? How did it taste when you took it out of the oven?
Trisha -
Yes it is sweet rice flour, the only thing I subbed was the millet flour. Do you have a different suggestion for a substitute? I do have a scale that measures to .01g. It smelled like chocolate cake. It tasted like chocolate cake. It was a little heavy and crumbled when I cut into it. But otherwise it tastes good. I usually can make all your recipes turn out. There’s some where you don’t have lists for subs and I have gotten those to turn out. So this one baffles me.
Sarah Menanix -
It's got me stumped too, especially because this is hands-down the recipe I make the most often haha. It definitely shouldn't be heavy and crumbly!
I have made it with teff flour in place of the millet flour by weight with success and I've also made a version with coconut flour in place of the millet flour, but with coconut flour, you need less, so in this case, only 48g coconut flour. This recipe is so easy to make smaller also, so if you're afraid of making a full sheetcake again while testing subs, you can do 1/3 of the recipe and bake it in an 8-inch cake pan for 33-37 minutes. I recommend trying again because this cake is so worth it. Please let me know if you do!
Trisha -
I finally got a chance to try this again. I had some old millet flour (we can’t use) so I weighed it and I only got 72g so I substituted 72g brown rice flour. I then put it in a lasagna size pan. It took about 33 min to bake. It was soooo good. Just thought I’d update if someone else had issues.
Alanna Taylor-Tobin -
I made this for my brother and nephew's birthday (same day!) The recipe was super clear and easy to follow and the cake baked up beautifully. My brother said it was amazing and that his kids loved it too. Thanks for the great recipe! Truly the perfect GF chocolate cake & buttercream.
Lynne Cook -
This recipe absolutely does not work with all purpose gluten free flour substituted in equal measure in place of the suggested flours. I found this out the hard way - the cake literally comes out with a heavy, rubbery, tire-like texture. It does work beautifully when the recipe is followed exactly, using the recommended flours. I baked it for the second time today, following the recipe exactly. It looks much better, and I cut a corner off for examination and tasting before frosting, just to make sure. My family of five, four of whom are celiacs, is looking forward to devouring it after dinner this evening.
Sarah Menanix -
Unfortunately, all the all-purpose gluten-free flours are very different so some may work well for cake and others won't (and always subbing out by weight and not cup measure as some weigh more than others due to the starch content and grind). This is why I prefer to bake with my own blends! Which one did you try here? For cakes, I would recommend Bob's Red Mill 1-to-1 subbed out by weight (though I haven't tried it with this specific recipe!).
Sarah Menanix -
That being said, I'm so glad you gave it another try with the recommended flours and it turned out as expected!
Debbie Elder -
Any chance you can get 25 portions or more out of this cake?
Sarah Menanix -
Oh I totally think you could! Cut it into 2.5 x 1.75 inch rectangles. For reference, it's 3x my cupcake recipe that makes a dozen each, so this cake will easily serve 25, if not more!
Rose -
What can I use if the person the cake is for cannot eat oats either?
Sarah Menanix -
While I haven't tried it, I'd recommend substituting the oat flour with sorghum or teff flour by weight!
Karen Gifford -
This cake is so incredibly moist and tasty! I can't get enough of it!
Anj -
Is there anyway to make this without the eggs? My little one had egg and gluten allergy. Thanks.
Sarah Menanix -
Yes! A friend of mine made a vegan version of this cake and used 1/4 cup aquafaba in place of each egg - you can see her variation here!
Sheri Nix -
This cake is so yummy, & perfect for family gatherings!
Sheri -
This reminds me of the moist chocolate cake my Mom made when I was a little girl, getting nostalgic...
Laura -
Substitute sweetener for sugar ???
How about monk fruit or coconut sugar
Still work?
My daughter is following a autoimmune protocol
No sugar, grain, dairy soy and gluten free
It’s so hard
sheenam @ thetwincookingproject -
Oh my!!! These look gorgeous!!! so happy to have landed on your blog via foodgawker. Subscribed right away :)
Natalie -
This chocolate sheet cake looks so delicious and perfect for parties!
Linda -
Any way to convert this to using Better Batter flour? Thank you so much. Looks delicious.
Sarah Menanix -
When I first started making a version of this cake years and years ago, I used a different blend of flour that included rice flour, etc. and it worked great. While I've never used Better Batter, to convert it, I would use the same amount of Better Batter by weight (not volume) and it should work great!
MatchaMe -
Reminds me of the betty crocker devils food cake, which for a basic on the shelf package cake, is pretty good. I can only imagine how delicious a home made version would be!
-Jared