Gluten and Dairy Free Chocolate Cake!
*This post may contain affiliate links. Please see my disclosure for more details!*
A two layer gluten free and dairy free chocolate cake for everyone to enjoy! Fudgey, chocolatey, and DELICIOUS. Prepped in 15 minutes, baked in 30 minutes total time of just 50 minutes.

Choosing the right dairy-free butter
The dairy-free butter you use is so important and makes or breaks a dairy-free cake. Many dairy-free spreads sold in plastic tubs contain a high water-to-fat ratio. If you bake with them, the excess water evaporates in the oven, causing your cake to sink, turn dense, or develop a rubbery layer. Furthermore, tub spreads will turn your chocolate buttercream into a runny, split mess.
For this recipe, you must use a hard, block-style dairy-free baking stick (such as the foil-wrapped Stork block or Vitalite block). Because dairy-free block butter softens and melts at a lower temperature than traditional dairy butter, the resulting buttercream will be exceptionally silky and supple. This makes it perfect for slathering generously between the layers and over the top of the cake.

Why you might need xantham gum
In traditional baking, gluten acts as the structure that holds the sponge together and traps air bubbles as the cake rises. When you remove gluten, large bakes lose their form, leading to a brittle, dusty texture that collapses into a pile of crumbs when sliced.
This is where xanthan gum comes in. It acts as a direct substitute for that missing gluten network, binding the starch particles together and locking in moisture. While you can often skip xanthan gum in small bakes like cupcakes, it is absolutely essential for a heavy, two-layer celebration cake like this one. A trusted brand like Doves Farm is readily available in most supermarkets and works flawlessly.

Naturally dairy-free chocolate
The secret to the deep flavor of this sponge is using real melted chocolate rather than relying solely on cocoa powder.
Most high-quality dark chocolate (70% cocoa solids or higher) is naturally dairy-free because it is made from cocoa mass, cocoa butter, and sugar. However, you must always check the ingredient label carefully. Some brands introduce milk fat, whey, or milk solids into their dark chocolate blends. If you are baking for someone with a severe dairy allergy, look for brands that explicitly guarantee a dairy-free manufacturing environment to avoid any cross-contamination.


Easy Recipe Variations
This recipe is highly adaptable depending on the dietary requirements of your guests:
- Dairy-Only Variant: If you need the cake to be dairy-free but do not mind gluten, simply swap the gluten-free flour for standard wheat-based self-raising flour and omit the xanthan gum.
- Gluten-Only Variant: If you need it to be gluten-free but can tolerate dairy, swap the dairy-free fat for standard unsalted dairy butter at room temperature in both the sponge and the frosting.
- Egg-Free/Vegan Option: If you also need an egg-free cake, I recommend checking out my dedicated vegan chocolate cake recipe, where you can simply swap the standard flour for a gluten-free blend with a pinch of xanthan gum.

FAQs
Yes, but because plain flour lacks raising agents, you will need to add 2 level teaspoons of gluten-free baking powder to the dry ingredients to ensure the cake layers rise properly.
This is almost always caused by using a high-moisture tub spread instead of a solid baking block, or by opening the oven door before the structure of the cake has fully set (usually within the first 25 minutes of baking).
This usually happens if your melted dark chocolate was still too warm when you added it to the dairy-free butter, causing the fat to melt completely. To fix a split buttercream, pop the mixing bowl into the fridge for 10 to 15 minutes to let the fats firm up again, then whip it on high speed for 2 to 3 minutes until it comes back together into a smooth emulsion.
I do not recommend swapping the block butter for liquid oil in this specific recipe. Liquid oils alter the structural chemistry of the batter, making a gluten-free sponge far too dense and heavy, which will prevent it from rising properly. Stick to a solid, block-style dairy-free fat for that traditional, fluffy crumb.



Gluten and Dairy Free Chocolate Cake Recipe
Ingredients
Cake Ingredients
- 300 g dairy free butter
- 300 g light brown sugar
- 300 g gluten free self raising flour
- 6 medium eggs
- 3/4 tsp xantham gum
- 200 g dark chocolate
Buttercream Ingredients
- 250 g dairy free butter
- 1 tsp vanilla extract
- 400 g icing sugar
- 200 g dark chocolate
Decoration
- 12 Strawberries
- Sprinkles
Instructions
For the Cake
- Preheat your oven to 180ºc/160ºc Fan, and line two 8"/20cm springform cake tins with parchment paper.
- Melt your dark chocolate in the microwave in short bursts, or in a bain marie. Leave to cool to room temperature.
- In a large bowl, add your dairy free butter, and light brown sugar. Beat together until light and fluffy.
- Add in your gluten free self raising flour, eggs, and xantham gum, and beat again until combined.
- Add in the cooled melted dark chocolate, and fold until combined.
- Split evenly between your tins, and bake for 35-40 minutes. Start checking the cake after 30 minutes, if its looked baked. A skewer should come out clean!
For the Buttercream
- Melt your dark chocolate in the microwave in short bursts, or in a bain marie. Leave to cool to room temperature.
- Make sure your dairy free butter is supple enough to mix first by leaving it to warm on the side for a bit.
- Add your dairy free butter to a bowl, and beat on its own for at least a minute to loosen it up.
- Add in the icing sugar and vanilla extract, and beat again. Add in the melted dark chocolate, and fold through.
For the Decoration
- Get your first cake, and and slather on half of the buttercream.
- Add on the second cake, and slather on the rest of the buttercream.
- Add a fresh strawberry for each slice, and sprinkle over your favourite sprinkles!
Notes
- This cake will last for 3 days once baking, and should be stored at room temperature.
- I use this 8″/20cm springform tin.

Storage and freezing
Keep the cake covered at room temperature for up to four days. If you need to make it ahead of time, the un-iced sponges freeze beautifully. Ensure they are completely cold, wrap them tightly in a double layer of cling film, and freeze for up to three months.
Gluten free baking
I’ve dabbled slightly in gluten free baking before with my gluten free double chocolate cookies and gluten free chocolate cupcakes and a few others, and I’ve done one dairy free recipe so far with my dairy free brownies, but I haven’t done both before. It’s something you do have to think about. You have to check every single ingredient first, which I made a mistake with before and it was a little odd.
Hi Jane
i love your recipes and have been asked to make a diary free chocolate for my friends daughter but she would like the cake covered in fondant as she would like a Elsa themed cake , would this recipe ne suitable to cover in fondant
many Thanks
Denise
Hey! Thank you! I believe it should – but naturally dairy free buttercream is softer, so it would be best to refrigerate it/freeze it for a little while before covering so it’s nice and firm!
Hi Jane
If I wanted to make this in x2 6” tins would I half the recipe? Or would that make the sponge too thin?
I would use 2/3 of the recipe to get roughly the same depth x
Hi, I was wondering if you think this cake would hold up well if made a week ahead and frozen? I like to make the cake in advance and decorate it from frozen, but haven’t made this recipe before and am a little unsure with GF baking!
Hey! Yes, it should be absolutely fine!! Make sure to protect the sponge well in the freezer to prevent any freezer burn!
Hi Jane! I was just wondering if fresh strawberry would work inside the cake ? If so would it be 150g like raspberrys would to the amount of ingredients?
I haven’t tried it with this cake – and theoretically it should be okay if you still use the xantham gum to help bind the sponge. Without it may fall apart slightly! And yes I would say max 200g! x
Hi Jane,
Just wondering if these could be cupcakes instead? If so, would I need to change anything?
Thank you, Lucy x
I would half the recipe for 12 cupcakes – baking them for about 20 minutes!x
Hi Jane,
If I just have one cake tin, would I just half the recipe? Thanks!
Hey! Yes that would work!
Hi Jane, I absolutely love your recipes and love that you’re branching out to free from food! One of my oldest friends turns 17 soon, so I thought for her birthday in lockdown I would bake her a cake to leave on her doorstep (she lives around the corner so can drop it on my daily dog walk!). She is Dairy-free, and I was hoping to make a 3 layer cake (and cover it in icing with a dark chocolate drip around the side). Do you have any suggestions on the adaptations I would need to do in terms of ingredients, quantities, etc to make this? Sorry I know it’s a big/long request I just really want to make her birthday as special as it can be given the circumstances and don’t want to risk messing it up!
Hey! Ah thats cute. For a three layer cake, you could easily just add on another half of the mix, and bake into a third tin! Or follow the steps of my other three layer drip cakes, but use dairy free alternatives like the stork block! x
Absolutely LOVE this recipe! My son is GF, DF & EF but he goes ok when egg is cooked in baking! I served it to everyone at his birthday party and they couldn’t believe it was GF & DF! It’s my “go to” choc cake recipe now! Thanks for an incredible recipe 🙂
Ahh that’s amazing!! I’m so glad!!
Stupid question time 😂
You said about stork in foil…. I have stork in a tub is that still acceptable to use please
Have a look at the ingredients of the stork… the foil wrapped block one is dairy free, the tub ones aren’t.
If i was wanting to make this as a victoria sponge, or even a caramelly cake would i just take out the chocolate? Amd obviously change the filling
Yes, you need to up the flour though in place of the cocoa powder!
Hi,
Can you just exclude the chocolate to make this into a plain sponge?
LOVE your recipes
Kelly
Yes, you need to up the flour though in place of the cocoa powder!
Hi Jane! I wonder if you can help me. I am planning to make your gluten and dairy free choc cake for a friends birthday on Friday. I’ve had a trial run of the sponge today and it looks a lot lighter than in your photos. Having looked at your comments I notice a couple of them you say about replacing the cocoa powder with flour to make it not a chocolate cake, however in the recipe I don’t see any cocoa powder. Have I missed something or should there be cocoa powder in there? Thank you x
It will just be the chocolate you have used (but also comparing photos isn’t always the best because of lighting in a photo if that makes sense) – the colour of the sponge shouldn’t matter as long as it tastes good! x
Hi Jane, I make majority of your recipes and in love, my boyfriend is gluten free so he doesn’t get to eat anything I bake so thinking of making this for him minus the dairy free stuff, but wandered if can change the dark chocolate to milk chocolate at all? As he’s not a huge fan in dark chocolate
Hiya! You can do for the buttercream yes, but in buttercreams the dark chocolate just makes it nice and chocolatey, the icing sugar takes away the bitterness of it! x
Hi, just wondered if you knew how much to adjust the amounts if you were going to make a 3 layered version?
I would use 1/3 more x