Go Back
Slice of gluten-free yellow cake with chocolate frosting

Gluten-Free Yellow Cake

An easy gluten-free yellow cake recipe. Dairy-free. Perfect for birthdays and other special occasions.
Prep Time 15 minutes
Cook Time 30 minutes
Servings 2 8" or 9" round cakes; one 9" x 13" cake, or 24 cupcakes.


For the Gluten-Free Yellow Cake

  • 2 1/2 cups gluten-free flour blend, see note (12 1/2 ounces; 355 grams)
  • 1 1/2 cups granulated sugar (10 1/2 ounces; 298 grams)
  • 2 1/4 teaspoons baking powder
  • 3/4 teaspoon salt
  • 1 cup vegetable oil (7 ounces; 198 grams)
  • 2/3 cup water or milk (5 1/3 ounces; 150 grams)
  • 4 large eggs (about 8 ounces out of shell; 226 grams)
  • 2 teaspoons vanilla extract

For the Chocolate Frosting

  • 4 cups powdered sugar, sifted (16 ounces; 453 grams)
  • 3/4 cup Dutch-process or natural cocoa powder, sifted (2 1/4 ounces; 65 grams)
  • 1 cup butter or dairy-free butter replacement, softened (8 ounces; 226 grams)
  • 1/4 teaspoon salt
  • 1/4 cup milk, water, or coffee plus more as needed, see note (2 ounces; 56 grams)


  1. Preheat oven and prepare the cake pans. Adjust oven rack to center position. Grease two 8-inch round cake pans with gluten-free nonstick cooking spray. Preheat oven to 350 degrees F.

  2. Make the Batter. Whisk together gluten-free flour, sugar, baking powder, and salt in a large bowl. Add oil, milk, eggs, and vanilla extract. Blend until smooth.

  3. Bake the Cakes. Divide batter equally between the two prepared cake pans. Bake until a cake tester inserted into the center of the cake comes out clean, about 30 minutes.

  4. Cool. Remove pans from the oven. Allow cakes to cool in the pan for five minutes and then turn out onto a wire rack to cool completely.

  5. Prepare chocolate frosting. Whisk together powdered sugar, cocoa powder, and salt in a small bowl.

  6. Beat butter for 30 seconds on high speed until light. Stop mixer. Add powdered sugar mix and milk or coffee. Mix, on low speed, until creamy. If frosting seems dry, add additional milk or coffee until smooth and creamy.
  7. Frost Cake. When cake is cool, fill and frost the cake.

Recipe Notes

Gluten-Free Flour Blend

This recipe was tested with Bob's Red Mill 1:1 Gluten-Free Flour Blend. Replacing the flour with another brand might change the texture of the cake. Be sure to use a flour blend that contains xanthan gum. If it doesn't, add 1 teaspoon of xanthan gum to the flour. Whisk to combine. Then use as directed.

Sheet Cake Directions

Lightly grease a 9 x13-inch pan. Bake the cake until golden brown  about 40. Allow cake to cool in the pan. Prepare frosting as directed above and frost cake when cool. 

Cupcake Directions
Line two 12-cup muffin pans with cupcake liners. Spoon batter into muffin cups, about 2/3 full. Bake until a toothpick inserted into the center of the cake comes out clean, about 20 minutes. Prepare frosting and frost cupcakes when cool.