Coffee and Walnut Cake

Coffee cake is such a British classic! Surely there can’t be anything better to enjoy on a lazy Sunday morning? I for one can’t think of anything better. This recipe has a gluten and dairy free coffee cake version too so is adaptable to different dietary requirements.

Gluten and dairy free
Gluten and dairy free coffee cake with slice

This coffee cake is so versatile and adaptable for dairy free and gluten free dietary requirements but it’s also great with an option for normal diets too.

DF: Dairy Free

GF: Gluten Free


  • 270 g Gluten free flour or 300g normal flour for non GF option
  • 30 g Cornflour (omit for non GF option)
  • 300 g Margarine
  • 300 g Caster sugar
  • 4 Eggs
  • 1 Espresso shot (made with 30mL boiled then slightly cooled water)
  • 70 g Walnuts (some chopped small and some whole for decoration)
  • 2 tsp Baking powder
  • 1 tsp Xanthan gum omit for non-gluten free version
  • Vegan ‘Buttercream’ Icing Recipe (Vanilla version with 1/2. teaspoon ground coffee)
Gluten and dairy free coffee cake ingredients

Recipe Tips

Dairy and Gluten Free Recipe

Indulge in the comforting flavours of a classic coffee cake, now available in both gluten and dairy-free versions. This versatile recipe caters to a wide range of dietary needs, ensuring that everyone can enjoy a slice of this delectable treat. The gluten-free version features a blend of gluten-free flour and cornflour, resulting in a moist and tender crumb. Meanwhile, the dairy-free version swaps traditional butter for margarine, creating a rich and flavourful cake without compromising on taste. Whether you’re avoiding gluten or dairy, or simply looking for a delicious coffee cake, this recipe has you covered.

Coffee cake with walnuts

Coffee cake is a quintessential British classic, perfect for a leisurely Sunday morning. This recipe is incredibly versatile, accommodating dairy-free and gluten-free dietary needs, while also appealing to those with no dietary restrictions. Over the years, I’ve discovered some clever hacks for swapping staple ingredients, such as gluten-free flour and margarine, to create adaptable recipes.

Tips for Baking Dairy Free


Margarine is a butter alternative made from hydrogenated vegetable oils, often containing a high proportion of rapeseed and sunflower oils. I prefer using solid margarine blocks for all my baking, whether it’s for biscuits, cakes, or even vegan ‘buttercream’. When selecting margarine, ensure it’s made from vegetable oil, as animal fat is sometimes used, and check that no additional dairy has been added for flavour.

Swapping butter for margarine is a straightforward substitution that many bakers swear by. The butter versus margarine debate has been ongoing for decades. Here are some key differences:

  • Margarine can yield a softer texture due to its higher water content.
  • Margarine is often more economical.
  • Butter imparts a rich, buttery flavour to baked goods, but sometimes a more delicate flavour is desired.
  • Baking with margarine can result in a denser crumb.
  • In cookies, margarine can create a lighter, cake-like texture, while butter yields a chewier texture with crisp edges. However, I prefer using oil instead of margarine for cookies. Check out my blog on using oil in your dairy-free cookies.
  • Margarine also has the added benefit of being lower in saturated fat, cholesterol, and calories compared to butter.
Coffee cake by deliciously free cupcake

How to Use Gluten Free Flour

I’ve discovered a few tricks for substituting gluten-free flour for regular flour:

Plain or self-raising flour?

I always choose plain flour, whether it’s gluten-free or not. This allows me to control the amount of raising agents I add, ensuring that I only use what’s necessary. It also means that I only need one type of flour in my pantry, saving space and preventing flour from sitting around too long, which can encourage bacterial growth. This is why consuming raw cookie dough isn’t recommended!


When substituting gluten-free flour for regular flour, I typically use about 10% less flour and add 10% cornflour or cornstarch. Cornflour is flavorless in cake batter but offers several advantages. It acts as a thickening agent and helps stabilize the eggs in the mixture, which aids in holding the structure together. Gluten-free flour can often result in a crumbly texture, and cornflour helps to counteract this. It also helps to eliminate the grainy texture that gluten-free flour can sometimes have. Finally, cornflour contributes to making the cake light and fluffy.

Xanthan gum:

Similar to cornflour, xanthan gum is a thickening agent. In baking, it’s frequently used with gluten-free flour to bind the cake together and prevent crumbliness. Only a small amount is needed, as too much can make your cake heavy. However, even a small amount can make a significant difference! If you’re using regular flour, you don’t need to add this ingredient. Also, be sure to check the ingredients of your gluten-free blend, as xanthan gum is sometimes already included, especially in gluten-free self-raising flour.


Occasionally, when substituting gluten-free flour, it can absorb more moisture, resulting in a slightly dry batter. If this occurs and you find the batter is a bit stiff, simply add a splash of milk or dairy-free milk to loosen it up a bit.

Gluten and dairy free coffee cake


I always use a fine powdered coffee for this cake, like Nescafe Azera. Adding fine powdered coffee to cake batter can be preferable to using granules for several reasons. Firstly, powdered coffee dissolves more easily in the batter, ensuring a more even distribution of flavour throughout the cake. This results in a more consistent and robust coffee flavour in every bite. Additionally, powdered coffee can help to enhance the texture of the cake, as it blends seamlessly with the other dry ingredients. On the other hand, granules can sometimes create a gritty texture in the cake, which may not be as pleasant. Overall, using fine powdered coffee in cake batter can lead to a more flavourful and enjoyable cake.

Boiling water should not be added directly to coffee powder because it can scorch or burn the coffee, resulting in a bitter and unpleasant taste. Coffee is a delicate ingredient that requires gentle handling to preserve its flavour and aroma. When exposed to high temperatures, the coffee grounds can release bitter compounds, which can overpower the natural flavours of the coffee. Instead, it is recommended to use hot water that is just below boiling temperature, around 200°F (93°C), to brew coffee. This allows the coffee to extract its flavours without being scorched or burnt. Additionally, using a coffee filter or French press can help to separate the coffee grounds from the water, resulting in a smoother and more enjoyable cup of coffee.

Try The Recipe

Coffee is a versatile ingredient that can add depth and complexity to cake recipes. Whether it’s used as a liquid component in the batter or as a flavouring agent in the frosting, coffee can enhance the overall taste and aroma of a cake. The natural acidity of coffee can also help balance the sweetness of the cake, creating a more well-rounded flavour profile. Additionally, coffee can add moisture to the cake, resulting in a softer and more tender crumb. Overall, coffee is a wonderful addition to cake recipes, providing a rich and robust flavour that is sure to delight your taste buds.

Tried this recipe? Please leave a star rating

Rating: 1 out of 5.
Gluten and dairy free coffee cake

Coffee and Walnut Cake

Enjoy a slice of this delicious cake on the weekend with a cup of coffee.
Prep Time 15 minutes
Cook Time 35 minutes
Course Dessert
Cuisine American
Servings 12 slices
Calories 409 kcal


  • 270 g Gluten free flour 300g normal flour for non-gluten free option
  • 30 g Cornflour Omit for for non-gluten free option
  • 300 g Margarine
  • 300 g Caster sugar
  • 4 Eggs
  • 1 Espresso shot Made with 30mL boiled then slightly cooled water
  • 70 g Walnuts Some chopped small and some whole for decoration
  • 2 tsp Baking powder
  • 1 tsp Xanthan gum Omit for for non-gluten free option

For the Icing


  • Preheat the oven to 190°C or 180°C fan.
  • Whisk together the sugar and margarine until smooth, light and fluffy.
  • Weigh out the dry ingredients and mix together.
  • Whisk the eggs into the batter one at a time long with a table spoon of dry ingredients, allow to completely combine before adding another egg.
  • Sift in the remaining dry ingredients and mix gently by hand until fully incorporated.
  • Mix in the espresso and chopped walnuts.
  • Divide the batter amongst 2 8 inch cake tins. Bake at 190°C/180°C fan for 35-40 minutes. Allow to cool before icing.
  • Add the dissolved coffee to my vegan 'buttercream' recipe, whisk on high until fully incorporated and use to ice the cakes . Enjoy…


Nutritional information is an estimate and exact values may vary. Nutritional values without icing.
Keyword coffee and walmut cake, coffee cake, dairy free, gluten free, gluten free coffee cake

Latest Recipes:

  • Chocolate Chip Cookies

    Chocolate Chip Cookies

    Gluten Free Option | Dairy Free Option | Chocolate chip cookies are the simplest recipe ever! So quick and easy to make and such a tasty treat.

  • Coffee and walnut Cookies

    Coffee and walnut Cookies

    Gluten Free Option | Dairy Free Option | I love these coffee and walnut cookies from the soft, chewy cookie base to the crispy walnut pieces and the melty dark chocolate!

  • Jammy Biscuits

    Jammy Biscuits

    Gluten Free Option | Dairy Free Option | These jammy biscuits are my take on the British classic, and of course they can be made gluten or dairy free

  • Vegan Chocolate Banana Cake

    Vegan Chocolate Banana Cake

    Gluten free option | Dairy free option | This vegan chocolate banana cake is light and fluffy, chocolatey and moist.

  • Fudgy Brownies

    Fudgy Brownies

    Gluten free option | Dairy free option | These fudgy brownies are my go-to recipe whenever I need an easy crowd pleaser! Mouthfuls of chocolate heaven.

Latest Blog Posts:

  • Gluten Free and Low FODMAP in Porto, Portugal

    Gluten Free and Low FODMAP in Porto, Portugal

    So here is a quick guide to my experience of eating gluten free (and low FODMAP) in Porto, Portugal.

  • How to Bake Gluten and Dairy Free – Cookie Edition

    How to Bake Gluten and Dairy Free – Cookie Edition

    Other blogs in the How To Series: How to Bake Gluten and Dairy Free – Cupcake Edition Let’s talk about the oil in these cookies. Now, it seemed really odd to me when I first used oil in my cookie recipe, but I’d been struggling for ages to bake a good cookie after making the…

  • Eating Low FODMAP in Corfu on Honeymoon

    Eating Low FODMAP in Corfu on Honeymoon

    If you read my blog post Baking my Own Wedding Cake then you would know that in June 2022 I married my favourite person. Two days later we jetted off to Corfu, Greece to spend two weeks in the sun for our honeymoon. Here is may experience of Eating Low FODMAP and gluten free in…

  • Gluten Free in Cologne, Germany

    Gluten Free in Cologne, Germany

    Hey, I’m Becky, founder of DeliciouslyFreeCupcake which was influenced by my gluten free and low FODMAP diet. Check out My low FODMAP journey. Having to eat this way often makes travelling pretty daunting. But travelling and eating food are two of the best things in life and two things I am absolutely never going to…

  • How to Bake Gluten and Dairy Free – The Cupcake Edition

    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…

Similar recipes:

How to Bake Gluten and Dairy Free – Cookie Edition

How to Bake Gluten and Dairy Free – The Cupcake Edition

Chocolate Fudge Cake

Lemon and Elderflower Sponge Cake

Vegan ‘Buttercream’ Icing Recipe