*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.

A finished Gluten & Dairy Free Chocolate Cake with strawberries decorating the top

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.

A close-up of a Gluten & Dairy Free Chocolate 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.

The strawberries on top of a Gluten & Dairy Free Chocolate Cake

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.

The side of the Gluten & Dairy Free Chocolate Cake
Stork and gluten-free self raising flour for the Gluten & Dairy Free Chocolate Cake

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.
A knife slicing a Gluten & Dairy Free Chocolate Cake

FAQs

Can I use gluten-free plain flour instead?

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.

Why did my cake sink in the middle?

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).

My buttercream turned grainy or split. How do I fix it?

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.

Can I use a liquid oil (like vegetable oil or coconut oil) instead of block butter?

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.

A slice of Gluten & Dairy Free Chocolate Cake
A slice of Gluten & Dairy Free Chocolate Cake on a plate

Gluten and Dairy Free Chocolate Cake Recipe

A two layer gluten free and dairy free chocolate cake for everyone to enjoy! Fudgey, chocolatey, and DELICIOUS.
Print Pin Rate
Category: Dessert
Type: Cake
Prep Time: 15 minutes
Cook Time: 35 minutes
Total Time: 50 minutes
Servings: 15 Slices
Author: Jane’s Patisserie

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

Another slice of Gluten & Dairy Free Chocolate Cake on a white plate

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.SaveSaveSaveSave

114 Comments

  1. Hasina on February 22, 2019 at 7:55 pm

    Hi, just wanted to know if this is ok for someone with a nut allergy

    • Jane's Patisserie on February 22, 2019 at 8:56 pm

      That is up for you to check – you need to check ingredients.



  2. C Iles on January 12, 2019 at 10:44 am

    Hi
    Would this be suitable for covering in sugar paste for a birthday?
    Thank you

    • Jane's Patisserie on January 12, 2019 at 7:50 pm

      I wouldn’t use as much buttercream, as it’s very soft – but it would be worth a try! Most cakes I cover have a stronger structure such as Madeira cake, but that’s difficult to achieve with GF and DF! X



  3. Paula on November 13, 2018 at 8:06 am

    Hi Jane!
    I have made this cake a couple of times now and it is so nice! My friend wants me to make the gluten free version for her, it doesn’t need to be dairy free so could I use in the cake Stork instead of butter? I will use butter for the buttercream as usual but I just wanted to check about the cake. Thank you! 🙂

    • Jane's Patisserie on November 13, 2018 at 9:26 am

      Yes you can use Stork for the sponge, and unsalted butter for the buttercream and keep the rest as is! xx



  4. Emma on November 12, 2018 at 9:20 pm

    Hi there,
    I only have one spring form tin (square)
    Could I put the whole amount in one & just cut it into 2 once baked or is there a risk of it not cooking properly with so much in one tin? I want to make this at the weekend for my sons birthday 😬

    • Jane's Patisserie on November 13, 2018 at 9:27 am

      It depends entirely on the size of the square tin, as a 9″ square = a 10″ round roughly, which is 2/3 bigger than the 8″ rounds I use. x



  5. Alison on October 24, 2018 at 9:50 am

    Hello,
    Can I use ordinary caster sugar instead of the light brown or will it make a difference to the taste?

    • Jane's Patisserie on October 24, 2018 at 1:09 pm

      It will make a difference to the taste, but you can still use caster sugar if you prefer.



  6. Niki on October 21, 2018 at 9:48 am

    5 stars
    Thank you, great recipe!! I separated the eggs and added the beaten egg whites at the end and the cake turned out real nice and fluffy… 🙂

  7. Katie on September 26, 2018 at 4:04 pm

    Hello!

    I’m making a gluten and dairy free cake for a birthday and want to try your recipe, but I was wondering if the Xantham Gum an essential ingredient? I’ve never heard of it before and don’t actually know what it’s for.
    If so where could I buy it from?

    Thanks 🙂

    Thanks

    • Jane's Patisserie on September 26, 2018 at 7:37 pm

      As mentioned in the post it’s not an essential ingredient, but it helps bind it and make it more cake like. Most supermarkets sell it in the freefrom section. x



  8. Anna on September 5, 2018 at 10:55 am

    Hi ya, I’m absolutely loving your recipes, just lush!! Can I ask a silly question,i want to make a special birthday cake for my partners birthday, his mum is gluten and dairy free. Could I double the butter cream and cover the cake and decorate with chocolates? Would butter cream hold? X thanks Anna xxx 😀

    • Jane's Patisserie on September 5, 2018 at 11:04 am

      Personally I haven’t tried it yet, as this buttercream is naturally quite a bit softer due to being dairy free. You could definitely try it, but I would say it could easily slop down a bit so might be safer to have a tester if you can x



  9. Adrienne Swan on July 15, 2018 at 9:53 am

    I made this yesterday for a friend. Not being used to gluten free baking, the sponge felt unusual, a bit dry. It was actually ok on tasting, but I added a drizzle which worked really, really well. I used cherry brandy and caster sugar, same quantities as for the drizzle on the elderflower and lemon cake. I guess the black currant cordial would also work in place of the brandy, if you were aiming for alcohol free…..

    • Jane's Patisserie on July 15, 2018 at 10:06 am

      The texture does seem different, but if you eat it normally its just as good as normal cake 🙌 if it was dry it might’ve been slightly overbaked, but the drizzle sounds delish!



  10. Paula on July 12, 2018 at 9:58 pm

    5 stars
    Hi Jane!
    I made this cake today and totally agree with you- it is so chocolate! It’s a definite winner!
    I’ll definitely be making this again!
    Thank you!
    Paula

    • Jane's Patisserie on July 13, 2018 at 9:42 am

      Ahh yay! I’m so glad you enjoyed it!!



    • Paula on July 24, 2018 at 7:56 am

      I know this may sound ridiculous but but I know you said you can swap for ordinary flour but I like the recipe so much that do you think it would be okay with normal flour and normal baking spread? I really like the taste so do you think it would work?



    • Jane's Patisserie on July 24, 2018 at 8:55 am

      I wouldn’t use normal baking spread for the buttercream, I would use actual unsalted butter because normal baking spread is a lot softer than even the dairy free one. And you don’t need to use the xantham gum either. But you can make it into a ‘normal’ cake easily! x



    • Paula on July 24, 2018 at 9:35 am

      Thank you! It was more for the cake as it’s so nice 🙂
      Great recipe!



  11. Donna on July 5, 2018 at 7:33 am

    I was eagerly reading your blog post, loving the sound of it… Then I scrolled to.the ingredients list…. Gasped in horror…. 6 eggs… those horrible little.things that will make me need my epi-pen… Arghhhhhhhh
    Oh well I hope everyone else enjoys it, it looks fantastic

    • Jane's Patisserie on July 5, 2018 at 9:06 am

      It’s advertised as Gluten Free and Dairy free, not egg free… but thank you, its very tasty 😊



    • Mimi on December 4, 2018 at 3:15 pm

      5 stars
      Is it possible to use an egg replacer for this recipe and still get the same results? I made this cake before and absolutely loved it but i have a few vegan friends who id like to make this for.



    • Jane's Patisserie on December 4, 2018 at 7:08 pm

      I have no idea I’m afraid!! x



  12. bethia watson on July 4, 2018 at 9:48 pm

    what sprinkles do u use

    • Jane's Patisserie on July 4, 2018 at 10:02 pm

      Little bronze crunch sprinkles from Waitrose



Leave a Comment

Recipe Rating