Gluten-Free Chocolate Cake

A slice of a gluten-free chocolate cake with chocolate frosting being lifted from the cake.

This is the best gluten-free chocolate cake recipe. The cake is incredibly moist with deep chocolate flavor, and it’s topped with smooth chocolate buttercream frosting. I’ve made this cake for weddings, birthdays, and every kind of celebration in between, and nobody ever knows it’s gluten-free.

The texture is perfect. Tender and fluffy, never dry or crumbly like some gluten-free cakes can be. And if you need a dairy-free chocolate cake, this recipe works for that too. Just swap the buttermilk for almond milk with vinegar, and use dairy-free butter in the frosting.

Why You’ll Love this Recipe

  • It’s incredibly moist. This cake stays soft and tender thanks to the oil and buttermilk. Even after a few days in the fridge, it’s still perfectly moist.
  • Deep chocolate flavor. The coffee enhances the chocolate without making it taste like coffee. You just get rich, intense chocolate in every bite.
  • Simple to make. Mix the dry ingredients, add the wet ingredients, pour in hot coffee, and bake. The batter is thin, which is normal, and it bakes up beautifully.

Ingredients

Ingredients for making a gluten-free chocolate cake with chocolate frosting.
The above shows ingredients for both the gluten-free chocolate cake and the chocolate frosting.

Ingredient Notes

  • Gluten-Free Flour: This recipe was tested with Bob’s Red Mill 1-to-1 Gluten-Free Baking Flour, which already contains xanthan gum. I can’t verify other brands work since I haven’t tested them myself.
  • Cocoa Powder: Use regular unsweetened cocoa powder, not Dutch-process. I like Hershey’s or Ghirardelli.
  • Hot coffee – You might be wondering what coffee is doing in this cake, but I promise it’s essential for enhancing the chocolate flavor. You don’t taste the coffee itself. However, if you don’t have coffee on hand or don’t want to use it, you can substitute water. If you are using coffee, it’s best that it be hot or at least warm, as it will incorporate easier into the batter.
  • Buttermilk – If you don’t have buttermilk, you can substitute it by mixing 1 cup of whole milk (or almond milk for dairy-free) with 1 tablespoon of apple cider vinegar.
  • Vegetable oil – Oil keeps this cake incredibly moist and makes it taller than butter would. You can substitute melted butter if you want, but the texture will be slightly different.
  • Eggs – Use room temperature eggs so they mix into the batter more easily.

Why is this batter so thin?

Don’t panic when you see how thin the batter is after adding the hot coffee. This is completely normal. The thin batter is what makes the cake so moist and tender. Let it sit for 2-3 minutes to thicken slightly before dividing it between the pans.

A slice of a gluten-free chocolate cake with chocolate frosting on a plate.

Recipe FAQs

Do I have to use coffee?

Coffee enhances the chocolate flavor without making the cake taste like coffee. However, it’s not strictly essential. You can substitute hot water for the coffee. The cake will still be delicious, just slightly less chocolatey.

Can this cake be made dairy-free?

Yes! Use almond milk mixed with 1 tablespoon apple cider vinegar instead of buttermilk. For the frosting, use a 50/50 combination of vegan butter and palm shortening.

Can I make this into cupcakes?

Yes! Divide the batter between 24 muffin cups and bake for 23-25 minutes. Check out my gluten-free chocolate cupcakes post for more tips.

Expert Tips

  • Let the batter rest. After adding the hot coffee, the batter will be very thin. Let it sit for 2-3 minutes to thicken slightly before pouring into pans.
  • Line your pans. Line the bottom of your cake pans with parchment paper, then grease and dust with cocoa powder. This ensures the cakes come out of the pans without sticking.
  • Weigh the batter. Use a food scale to divide the batter evenly between the two pans. This ensures both layers bake evenly and are the same height.
  • Check for doneness. The most accurate way is to use an instant-read thermometer. The internal temperature should read 200-205°F in the center of the cake. You can also use a toothpick. It should come out clean or with just a few moist crumbs. If you see wet batter, bake for another 3-5 minutes.

Refrigerator: Store frosted cake covered in the refrigerator for up to 5 days. Let it sit at room temperature for 20-30 minutes before serving so the frosting softens.

Freezer (Unfrosted): Wrap cooled cake layers tightly in plastic wrap, then wrap again in foil. Freeze for up to 3 months. Thaw in the refrigerator overnight before frosting.

Freezer (Frosted): Wrap the entire frosted cake or individual slices in plastic wrap and foil. Freeze for up to 2 months. Thaw in the refrigerator overnight.

Serving Suggestions

This chocolate cake is delicious with the chocolate buttercream in the recipe, but you can easily switch it up. For a chocolate and peanut butter combo, use peanut butter frosting instead. Or if you want something even richer, try chocolate cream cheese frosting.

If you want to serve it with something cold, a scoop of fresh strawberry ice cream with strawberry coulis drizzled over the top is amazing. The fruity strawberry flavor with the rich chocolate cake is such a good pairing.

A gluten-free chocolate cake with chocolate frosting on a cake stand.
A slice of a gluten-free chocolate cake with chocolate frosting on a plate.
5 from 2 votes

Gluten-Free Chocolate Cake

This is the best gluten-free chocolate cake recipe. It's soft and moist with intense chocolate flavor that comes from cocoa powder and hot coffee. It's so moist and fluffy, nobody will know it's gluten-free. Top it with a smooth chocolate buttercream. Perfect for any celebration.
Print Recipe Pin Recipe Rate this Recipe
Prep Time 20 minutes
Cook Time 35 minutes
Cooling Time 30 minutes
Total Time 1 hour 25 minutes
Servings 12 servings

Ingredients

Chocolate Cake:

  • 2 cups (280 g) gluten-free all purpose flour blend - I used Bob's Red Mill 1-to-1 Gluten-Free Flour Blend*
  • 2 cups (400 g) granulated sugar
  • ¾ cup (75 g) cocoa powder
  • 2 teaspoons baking powder
  • 2 teaspoons baking soda
  • 1 teaspoon salt
  • 1 cup (240 g) buttermilk - or 1 cup almond milk mixed with 1 tablespoon apple cider vinegar
  • ½ cup (113 g) vegetable oil - or melted butter if you prefer
  • 2 (100 g) large eggs
  • 1 tablespoon (13 g) vanilla extract
  • 1 cup (240 g) hot coffee

Chocolate Frosting:

  • 2 cups (454 g) unsalted butter - softened at room temperature (or a 50/50 mix of palm oil shortening and vegan butter)
  • 1 ½ cups (150 g) cocoa powder - sifted
  • 5 cups (600 g) powdered sugar - sifted
  • ¼ cup (60 g) whole milk - or almond milk, you may need more to thin out the frosting
  • 1 tablespoon (13 g) vanilla
  • ¼ teaspoon salt

**Use the toggle button above to turn the instruction photos on and off!

Instructions

Make the Cake:

  • Preheat the oven to 350°F. Grease two 8-inch round cake pans with butter. Line the bottoms with parchment paper circles. Butter the parchment paper, then dust the pans with cocoa powder, tapping out any excess.
  • In a large bowl, whisk together 2 cups (280 g) gluten-free all purpose flour blend, 2 cups (400 g) granulated sugar, ¾ cup (75 g) cocoa powder, 2 teaspoons baking powder, 2 teaspoons baking soda, and 1 teaspoon salt. Whisk for about 30 seconds to make sure everything is evenly distributed and there are no lumps of cocoa powder.
    A glass bowl filled with a mixture of cocoa powder and flour on a marble surface, with a metal whisk resting inside. A pink cloth is partially visible in the corner.
  • Add 1 cup (240 g) buttermilk, ½ cup (113 g) vegetable oil, 2 (100 g) large eggs and 1 tablespoon (13 g) vanilla extract directly to the bowl with the dry ingredients. Mix with an electric mixer on medium speed for about 2 minutes, stopping to scrape down the sides of the bowl halfway through. The batter should look smooth and well combined.
    A glass bowl filled with dry chocolate cake mix, eggs, milk, and vanilla extract, about to be mixed together on a light marble surface with a pink cloth nearby.
  • Reduce the mixer speed to low. Carefully and slowly pour in 1 cup (240 g) hot coffee while the mixer is running. Mix until just combined, about 30 seconds. The batter will be very thin. Let the batter sit for 2-3 minutes to thicken slightly before pouring into the pans.
    A glass bowl of chocolate cake batter is being mixed with an electric hand mixer on a white marble surface, with a pink cloth partially visible in the background.
  • Divide the batter between the two prepared cake pans. I like to use a food scale to ensure that my layers have approximately the same amount of batter.
    A round cake pan filled with chocolate cake batter sits on a marble countertop next to a pink cloth. Another cake pan is partially visible in the background.
  • Bake at 350°F for 30-35 minutes. The cakes are done when a toothpick inserted in the center comes out clean or with just a few moist crumbs. For the most accurate test, use an instant-read thermometer. The internal temperature should read 200-205°F in the center.
    A round, freshly baked chocolate cake in a metal pan sits on a marble surface next to a peach-colored cloth. Another cake pan is partially visible in the background.
  • Remove the pans from the oven and place them on a wire rack. Let the cakes cool in the pans for 10 minutes.
  • Run a knife around the edges of the pans to loosen the cakes. Turn them out onto the wire rack, peel off the parchment paper, and let them cool completely before frosting.

Make the Frosting:

  • While the cakes are cooling, make the frosting. In a large bowl, beat 2 cups (454 g) unsalted butter with an electric mixer on medium speed until creamy and smooth, about 2 minutes.
    A glass mixing bowl containing creamed butter and sugar, with a hand mixer and a pink kitchen towel nearby on a marble countertop.
  • Add 1 ½ cups (150 g) cocoa powder and mix until combined.
    A glass mixing bowl with cocoa powder, sugar, and butter being mixed by an electric hand mixer on a white countertop next to a pink kitchen towel.
  • Add 5 cups (600 g) powdered sugar, ¼ cup (60 g) whole milk, 1 tablespoon (13 g) vanilla, and ¼ teaspoon salt to the bowl.
    A glass bowl containing chocolate batter and a mound of powdered sugar on top, sitting on a marble surface with part of a pink cloth visible to the side.
  • Beat on low speed for about 30 seconds until the ingredients start to come together. Then increase the speed to medium-high and beat for 3-4 minutes until the frosting is light, fluffy, and smooth. Scrape down the sides of the bowl as needed.
    A glass bowl filled with creamy, swirled chocolate batter sits on a white marble surface next to a folded light pink cloth.
  • If the frosting is too thick, add another tablespoon of milk. If it's too thin, add 2-3 tablespoons more powdered sugar.

Frost the Cake:

  • Make sure the cakes are completely cool before frosting. If they're even slightly warm, the frosting will melt.
  • Place one cake layer on a serving plate or cake stand. If the top is very domed, you can use a serrated knife to level it off for easier stacking.
    A single round chocolate cake layer sits on a white cake stand with a large dollop of chocolate frosting on top; a pink cloth is partially visible on the side, all on a marble surface.
  • Spread about 1 cup of chocolate buttercream evenly over the top of the first layer, leaving about ¼ inch from the edges.
    A round chocolate cake with smooth chocolate frosting sits on a white plate atop a marble surface. A folded light pink cloth is placed nearby on the left side of the image.
  • Place the second cake layer on top, pressing down gently to secure it.
    A round, unfrosted, two-layer chocolate cake with visible chocolate frosting between the layers, sits on a white cake stand atop a marble surface. A pink cloth is partially visible on the left.
  • Spread a thin layer of frosting over the top and sides of the entire cake. This is called a crumb coat and it helps seal in any loose crumbs. Don't worry if you can see cake through the frosting at this stage.
  • Refrigerate the cake for 15-20 minutes to let the crumb coat set.
  • Spread the remaining frosting over the top and sides of the cake in a thicker, final layer. Use an offset spatula or butter knife to smooth it out.
    A round chocolate cake covered in smooth chocolate frosting sits on a white plate, with a pink cloth nearby and a cake server partially visible on the side.
  • Slice and serve. The cake is best at room temperature.
    A slice of rich chocolate cake with chocolate frosting sits on a white plate beside a gold fork, with another slice and a pink napkin nearby on a marble surface.

Notes

  • Gluten-Free Flour: I recommend Bob’s Red Mill 1-to-1 Gluten Free Baking Flour (in the blue bag) for this recipe, which contains xanthan gum. I can’t verify other brands work since I haven’t tested them.
  • Weighing Ingredients: For best results, weigh your flour and cocoa powder using a kitchen scale. This is especially important for gluten-free baking to get the right texture. Scooping with measuring cups can pack in too much flour and make the cake dense.
  • Storage: Store the frosted cake covered at room temperature for up to 2 days, or in the refrigerator for up to 5 days. If you refrigerate it, let the cake sit at room temperature for 30 minutes before serving so the frosting softens and the cake tastes its best.

Nutrition

Serving: 12g | Calories: 812kcal | Carbohydrates: 109g | Protein: 7g | Fat: 44g | Saturated Fat: 23g | Polyunsaturated Fat: 7g | Monounsaturated Fat: 11g | Trans Fat: 1g | Cholesterol: 111mg | Sodium: 476mg | Potassium: 381mg | Fiber: 8g | Sugar: 85g | Vitamin A: 1026IU | Calcium: 106mg | Iron: 3mg
5 from 2 votes (2 ratings without comment)

Leave a Reply

Your email address will not be published. Required fields are marked *

Recipe Rating




This site uses Akismet to reduce spam. Learn how your comment data is processed.