This gluten-free chocolate cake pairs cocoa with brewed coffee for a deep chocolate flavor and a soft, tender crumb. The batter comes together with everyday ingredients, and a simple coffee buttercream makes it feel celebration-ready without requiring complicated techniques.
Ingredients
For the cake:
- 2 cups (280 g) gluten-free all-purpose flour blend, preferably one that includes xanthan gum
- ¾ cup (65 g) unsweetened natural cocoa powder
- 1¾ cups (350 g) granulated sugar
- 1½ teaspoons baking powder
- 1½ teaspoons baking soda
- 1 teaspoon fine salt
- 2 large eggs, at room temperature
- 1 cup (240 ml) buttermilk, at room temperature
- ½ cup (120 ml) neutral oil, such as canola or sunflower
- 2 teaspoons vanilla extract
- 1 cup (240 ml) hot, freshly brewed coffee
- 1 tablespoon butter or oil, for greasing the pans
For the coffee buttercream:
- ¾ cup (170 g) unsalted butter, softened
- 3 cups (360 g) powdered sugar, sifted if lumpy
- ⅓ cup (30 g) unsweetened cocoa powder
- 2 tablespoons strong brewed coffee, cooled
- 1 teaspoon vanilla extract
- 1 to 2 tablespoons milk or cream, as needed
- ⅛ teaspoon fine salt
Instructions
- Prepare the pans and oven. Heat the oven to 350°F (175°C), with a rack near the center. Grease two 8-inch round cake pans. Line the bottoms with parchment rounds, then lightly grease the parchment too. This helps the delicate gluten-free layers release cleanly after baking.
- Combine the dry ingredients. In a large mixing bowl, whisk together the gluten-free flour blend, cocoa powder, sugar, baking powder, baking soda, and salt. Break up any firm cocoa lumps as you whisk. Distributing the leaveners evenly now helps the cake rise consistently rather than developing isolated bitter or overly airy spots.
- Mix the wet ingredients. In a separate bowl, whisk the eggs, buttermilk, oil, and vanilla until smooth. Pour this mixture into the dry ingredients and whisk or beat on low speed just until no dry patches remain. Scrape the bottom and sides of the bowl once. Avoid prolonged mixing; there is no gluten to develop, and extra beating is not needed.
- Add the coffee carefully. Slowly pour in the hot brewed coffee while whisking on low. The batter will become quite thin, which is expected. Coffee enhances the cocoa flavor rather than making the cake taste like a cup of coffee. If you are using an electric mixer, keep it on low and pour steadily to prevent splashes.
- Fill the pans. Divide the batter evenly between the prepared pans. If you want especially even layers, weigh the pans after filling and adjust the batter until they are close in weight. Tap each pan gently once on the counter to release large air pockets, but do not bang them hard enough to splash batter.
- Bake until set. Bake for 30 to 35 minutes, rotating the pans front to back after about 20 minutes if your oven browns unevenly. Start checking at 30 minutes. A toothpick inserted near the center should come out with a few moist crumbs but no wet batter, and the tops should spring back lightly when touched. Gluten-free cakes can dry out if left in the oven after they are done.
- Cool the layers. Set the pans on a cooling rack for 15 minutes. Run a thin knife around each edge, turn the cakes out onto the rack, peel away the parchment, and let them cool completely before frosting. Warm cake is fragile and will melt the buttercream. If the layers dome slightly, level them with a serrated knife once fully cool.
- Make the buttercream. Beat the softened butter in a bowl until creamy, about 1 to 2 minutes. Add the powdered sugar, cocoa, and salt in two or three additions, mixing on low at first so the sugar does not puff out. Beat in the cooled coffee and vanilla. Add milk or cream a teaspoon at a time until the frosting is spreadable, then beat for another minute until smooth.
- Assemble and frost. Place one completely cooled layer on a serving plate. Spread about a third of the buttercream over it, then set the second layer on top. Cover the top and sides with the remaining frosting. For a neat finish, apply a thin crumb coat first, chill the cake for 15 to 20 minutes, and then add the final coat. Serve immediately or let the frosting set before covering.
Tips
- Check your flour blend. Gluten-free blends vary in starch and binder content. Use a measure-for-measure blend intended to replace wheat flour, and check that it contains xanthan gum. If it does not, follow the blend maker’s guidance; adding an arbitrary amount can make the crumb gummy. Spoon flour into the measuring cup and level it, or weigh it for a more reliable result.
- Bring cold ingredients closer to room temperature. Eggs and buttermilk that are not refrigerator-cold mix more evenly into the batter. If you are short on time, place the eggs in warm (not hot) water for several minutes. Do not heat the buttermilk until warm, because that can change its texture.
- Use hot, not boiling, coffee. Freshly brewed coffee that is hot helps bring out the cocoa’s flavor, but it does not need to be boiling. A medium or dark roast works well. If you prefer to avoid caffeine, use decaf coffee at the same strength.
- Let the cake cool fully before frosting. Gluten-free cake layers can crumble more easily while warm. If the cooled layers still feel very soft, chill them for 20 to 30 minutes before assembling. For clean slices, use a sharp knife and wipe it between cuts.
Serving Suggestions
Serve the cake at cool room temperature so the buttercream is soft and the chocolate flavor comes through clearly. A small slice is satisfying after a meal; pair it with fresh raspberries, sliced strawberries, or a few tart cherries to balance the sweetness. A spoonful of lightly sweetened whipped cream is another good option, especially if you keep the frosting layer thin.
For a coffee-forward dessert, offer espresso or black coffee alongside it. If you would rather not serve more coffee, cold milk or unsweetened tea makes a pleasant contrast. This cake also works well for birthdays and potlucks: frost it on a sturdy plate, bring a covered cake carrier, and cut modest slices because the layers are rich.
Variations
Make it dairy-free: Use an unsweetened dairy-free milk mixed with 1 tablespoon lemon juice or vinegar in place of the buttermilk, and use dairy-free baking sticks for the frosting. Let the milk mixture sit for about 5 minutes before adding it. Choose a dairy-free frosting alternative if your baking sticks do not whip smoothly.
Use a simple ganache topping: If you want a less sweet finish, skip the buttercream and pour a ganache over the cooled cake. Warm 1 cup (240 ml) heavy cream until steaming, pour it over 8 ounces (225 g) finely chopped semisweet chocolate, wait 2 minutes, then stir until glossy. Cool until thick enough to spread. This version is not dairy-free unless you use suitable alternatives.
Add a little texture: Fold ½ cup (about 60 g) mini chocolate chips into the finished batter, or scatter toasted chopped walnuts over the frosting. Make sure any add-ins and decorations are labeled gluten-free if you are baking for someone with celiac disease or a strong sensitivity.
Make cupcakes: Divide the batter among lined muffin cups, filling each about two-thirds full. Bake at 350°F (175°C) for approximately 18 to 22 minutes, checking with a toothpick near the center. The yield depends on the size of the cups, so begin checking early and cool the cupcakes completely before frosting.
Storage and Reheating
Keep the frosted cake covered at cool room temperature for up to 2 days if your kitchen is not warm. For longer storage, refrigerate it in an airtight cake carrier or under a cover for up to 5 days. Refrigeration firms the buttercream and cake, so set slices out for 30 to 60 minutes before serving for a softer texture and fuller flavor.
To freeze, place unfrosted, completely cooled layers on a tray until firm, then wrap each layer tightly in plastic wrap and a layer of foil. Freeze for up to 2 months. Thaw the wrapped layers overnight in the refrigerator or for several hours at room temperature, then unwrap and frost. You can also freeze individual frosted slices in airtight containers for up to 2 months; thaw them in the refrigerator and bring them toward room temperature before eating.
This cake is best served at room temperature rather than reheated. If you want a slightly warm unfrosted slice, microwave it for about 8 to 12 seconds, then check and add a few seconds only if needed. Avoid microwaving a frosted slice for long: buttercream softens quickly and may melt or slide off.
Frequently Asked Questions
Does the cake taste strongly of coffee?
The coffee mostly deepens the chocolate flavor, so the finished cake tastes like rich chocolate rather than a mocha. The buttercream has a more noticeable coffee note, but it is still balanced by cocoa and sugar. For a milder result, use decaf or replace the brewed coffee in the cake with hot water; the chocolate will still be good, though a little less rounded.
Can I use instant coffee instead of brewed coffee?
Yes. Dissolve instant coffee or espresso powder in hot water, then measure the amount of liquid specified for the cake. For the frosting, dissolve a small amount in the two tablespoons of liquid and cool it before mixing. Espresso powder is concentrated, so start with a modest amount and taste the frosting before adding more.
Can I make the cake without buttermilk?
Yes. For a close substitute, stir 1 tablespoon lemon juice or white vinegar into enough milk to make 1 cup, then let it stand for 5 minutes before using. Unsweetened plant milk can be treated the same way for a dairy-free cake. The result may be a little different from true buttermilk, but it provides the acidity the baking soda needs.
Why did my gluten-free cake sink in the middle?
A center that sinks can mean the cake was underbaked, the oven door was opened early, or the baking powder or soda was measured incorrectly. Check that your oven is fully heated, use level measurements, and wait until the center springs back and a toothpick has no wet batter before removing the pans. Also use a reliable flour blend; changing the flour-to-liquid balance can affect the structure.
Can I bake the layers a day ahead?
Yes. Cool them completely, wrap each layer tightly, and keep them at room temperature overnight if your kitchen is cool, or refrigerate them for longer. Chilled layers are often easier to frost. Let refrigerated cake layers sit briefly while you make the buttercream, but keep them wrapped until you are ready to assemble so they do not dry out.
How do I keep the cake safe for someone with celiac disease?
Use ingredients labeled gluten-free, including the flour blend, cocoa, coffee, and decorations. Wash the bowl, beaters, pans, and work surface, and avoid shared utensils or flour-dusted areas that may have wheat residue. If the cake is for a guest with celiac disease, ask about their needs and take care with storage and serving utensils as well as the ingredients.