How to Bake Gluten and Dairy Free – The Cupcake Edition

Like many others I didn’t have to start eating gluten and dairy free until my twenties. But this left me with so many of my favorite recipes that I was no longer able to eat. Because of this I’ve put a lot of research into adapting these recipes for my new dietary requirements. So I’m hoping to pass on some of that knowledge on how to bake gluten and dairy free here!

Please read on for my latest blog in the How to Bake Gluten and Dairy Free Series – The Cupcake Edition

Other blogs in the How To Series:
How to Bake Gluten and Dairy Free – Cookie Edition
Pink and white cupcakes - gluten and dairy free

How to Bake Gluten and Dairy Free – The Cupcake Edition

Baking dairy free

Baking gluten free

Bake Dairy Free

Margarine is an alternative to butter made out of hydrogenised vegetable oils. Often consisting highly of rape seed oil and sunflower oil. It can come in tubs as a softer spreadable version. However, I always use the harder margarine blocks for all of my baking whether it be biscuits, cakes or even my vegan ‘buttercream’. Also, be sure to make sure the margarine you choose is made from vegetable oil as animal fat can sometimes be used, and make sure no extra dairy has been added for flavor.

This is probably the easiest swap ever, it can be swapped in at the same quantity as butter. Many people swear by baking with margarine rather than butter and the butter vs margarine debate has been going for decades. Here is the load-down on some of the main differences:

1) Margarine can give a softer texture due to the higher water content.

2) Margarine is often cheaper.

3) Butter gives baked goods that ‘buttery’ richness, however sometimes a more delicate flavor is called for.

4) Baking with margarine can sometimes give a denser crumb.

5) With cookies margarine can give a lighter cakier texture whereas butter gives a chewier texture with crispier edger. However I never bake cookies with margarine, instead I use oil which gives cookies that perfect gooie center. Check out my Use oil in your DF cookies blog.

6) Margarine also has the added benefit of being lower in saturated fat, cholesterol and calories than butter too!

Gluten and dairy free lemon cupcake

“Buttercream” Icing

What better way to make a cupcake look pretty than by using buttercream. My vegan ‘buttercream’ recipe is so easy. Honestly I think it tastes just the same as the original but I’ll let you judge that for yourself. It uses hard blocks of margarine instead of butter to make it completely vegan and dairy free (depending on what you choose to flavor it with).

Buttercream is also so versatile and you can flavor it with almost anything you want. Here I give you my lemon, strawberry and vanilla versions but you can also use this base recipe for chocolate ‘buttercream’ (by adding cocoa powder to the vanilla version), raspberry or even rum flavored icing…The world is yours to experiment!

Link to my Vegan “Buttercream” Recipe

Gluten and dairy free strawberry cupcakes


Some recipes call for buttermilk, an ingredient not available in the supermarkets as a dairy or lactose free version. Buttermilk is a great ingredient for making moist fluffy cakes but it’s not accessible for lactose/dairy free or plant based diets. Thankfully there is a great home made alternative! This can also be used simply as a cheaper alternative to buttermilk or to save a special trip to the supermarket.

To make you homemade buttermilk alternative, simply take your milk of choice (lactose free or soy would work best for this) and add a splash of lemon juice. The acidity of the lemon juice will curdle the milk, but this is what you want! Acidity breaks down some of the proteins in the batter and adds to a smooth tender texture, just what you want with a delicious cake. The acidity will also react with the bicarbonate of soda to create carbon dioxide and cause the cake to rise.

Bake Gluten Free


I have found a couple of little tricks for when using gluten free flour. Typically I find you can swap it in at the same quantity, or a little lower (roughly 10% less), to normal flour depending on the recipe.

Plain four or self raising flour?

I always bake with plain flour, whether it be gluten free or not. This is because I like to be in control of my raising agents, only adding exactly what I need. It also means I only need to have one type of flour in the house. This both saves on space and means I don’t have flour hanging around too long in the cupboard. Raw flour is a good place for bacteria to grown which is why eating raw cookie dough isn’t a great idea!


When using gluten free flour rather than normal flour I use roughly 10% less flour and add in 10% cornflour/cornstarch. Cornflour is flavorless in the cake batter but it has a few benefits, firstly it’s a thickening agent but also helps to stabilise the eggs in the mixture and so half hold the structure together – gluten free flour can often be crumbly. Gluten free flour can also often have a grainy texture in our mouth but I have found adding a little cornflour to the mix helps remove this. Finally I also think the cornflour helps to make the cake light and fluffy.

Xanthan gum

Like cornflour, xanthan gum is a thickening agent. In baking it is often used with gluten free flour to help bind the cake together and prevent crumbliness. You only need a tiny bit as too much can make your cake heavy. But a small amount has a big difference! You don’t need to add this if you are baking with normal flour and be sure to check the ingredients of your gluten free blend as it can sometimes already be added to the mixture (more often with gluten free self raising flour).


Sometimes when substituting in gluten free flour it can absorb more of the moisture and make the batter a bit dryer. If this happens and you think its a bit stiff then you just need to add a splash of milk/dairy free milt to the batter to loosen it up a tad.

Chocolate cupcakes

Cooking time and Temp

I find with gluten and dairy free baking you can cook your recipes at the same temperature as you would before. However, sometimes you may need to bake for up to 5 minutes longer.

Final Points

I hope this blog post has help to convince you that free from baking isn’t a scary thing! Please let me know how it does is you try and of my tips out and leave a comment. I pride myself on my recipes being adaptable for lots of different dietary requirements, Whether it be gluten and dairy free like me, just one or the other, or for all those lucky people who can eat whatever they like. Therefore my recipes often have different options depending on your dietary needs.


Leave a Reply

Gluten and dairy free cupcakes with vegan buttercream icing