This gluten-free and dairy-free birthday cake is a tender, moist vanilla layer cake that works for birthdays, first birthdays, or any celebration where guests avoid wheat and dairy. It holds up well for stacking and frosting, and it tastes like a classic party cake—not a compromise. Serve it with a dairy-free buttercream and fresh berries, or pair it with dairy-free ice cream for a sundae-style dessert.
Ingredients
- 2 cups (280 g) gluten-free all-purpose flour (with xanthan gum, or add 1 tsp xanthan gum if your blend lacks it)
- 1 ½ cups (300 g) granulated sugar
- 1 tsp baking powder
- ½ tsp baking soda
- ½ tsp salt
- ¾ cup (180 ml) unsweetened dairy-free milk (almond, oat, or rice)
- ½ cup (120 ml) neutral oil (canola or sunflower)
- 3 large eggs (room temperature)
- 2 tsp vanilla extract
- 1 tbsp (15 ml) lemon juice or apple cider vinegar (to react with baking soda)
Dairy-Free Buttercream Frosting
- 1 cup (224 g) dairy-free buttery sticks (e.g., Earth Balance) or refined coconut oil, softened
- 4 cups (480 g) powdered sugar
- 2 tsp vanilla extract
- 2–4 tbsp (30–60 ml) dairy-free milk, as needed
Instructions
- Preheat the oven to 350°F (175°C). Grease two 8-inch (20 cm) round cake pans and line the bottoms with parchment paper.
- In a large bowl, whisk together the gluten-free flour, sugar, baking powder, baking soda, and salt.
- In a medium bowl, whisk the dairy-free milk, oil, eggs, vanilla, and lemon juice until well combined.
- Pour the wet ingredients into the dry ingredients and stir with a spatula until just combined. The batter will be slightly thinner than a typical cake batter—do not overmix.
- Divide the batter evenly between the prepared pans (about 1 ½ cups / 360 ml per pan).
- Bake for 25–30 minutes, until a toothpick inserted into the center comes out clean and the top springs back when lightly pressed.
- Cool the cakes in the pans on a wire rack for 10 minutes, then turn them out and cool completely, about 1 hour, before frosting.
- To make the frosting: beat the softened dairy-free butter or coconut oil with an electric mixer until creamy, about 2 minutes. Add the powdered sugar, 1 cup at a time, beating on low speed. Add vanilla and 2 tablespoons of dairy-free milk; beat on medium-high until fluffy, adding more milk 1 tablespoon at a time if needed to reach spreading consistency.
- Place one cake layer on a serving plate. Spread about ¾ cup of frosting on top. Place the second layer on top and frost the top and sides. Refrigerate for 30 minutes before slicing for cleaner cuts.
How to Tell It’s Done
The cake is done when a toothpick inserted into the center comes out clean or with only a few moist crumbs, and the top is golden and springs back when gently pressed. The internal temperature should be about 200°F (93°C) if you use an instant-read thermometer. Overbaking dries out gluten-free cakes, so start checking at 25 minutes.
Scaling the Recipe
This recipe makes one 8-inch double-layer cake (12 servings). For a 9×13-inch sheet cake, bake the full recipe in a greased 9×13-inch (23×33 cm) pan for 30–35 minutes. For a half batch, use one 8-inch round pan and bake for 20–25 minutes; for a double batch, use three 8-inch pans and bake for 28–32 minutes.
| Batch | Flour | Sugar | Eggs | Baking Time |
|---|---|---|---|---|
| Half (6 servings) | 1 cup (140 g) | ¾ cup (150 g) | 1 ½ (or 1 whole + 1 yolk) | 20–25 min |
| Full (12 servings) | 2 cups (280 g) | 1 ½ cups (300 g) | 3 | 25–30 min |
| Double (24 servings) | 4 cups (560 g) | 3 cups (600 g) | 6 | 28–32 min |
For a half batch with an odd egg, beat the egg in a small bowl, use half of it (about 1 ½ tbsp / 22 ml), and discard the rest.
Equipment That Matters
Use a kitchen scale for the flour—gluten-free flours vary widely in density, and a cup of one brand can weigh 120–160 g. A digital thermometer helps for doneness. If you don’t have two 8-inch pans, use one 9-inch round pan and bake for 30–35 minutes; the layer will be taller. For a dairy-free buttercream that holds its shape, use buttery sticks rather than tub margarine, which has more water. If using coconut oil, make sure it’s refined (no coconut flavor) and softened, not melted.
Storage and Freezing
Frosted cake keeps in the refrigerator for up to 4 days in an airtight container. Unfrosted layers can be wrapped tightly in plastic wrap and frozen for up to 3 months; thaw in the refrigerator overnight before frosting. Frosted cake can also be frozen for up to 2 months—place it in the freezer unwrapped for 1 hour to set the frosting, then wrap in plastic wrap and foil. Thaw in the refrigerator overnight. Perishable dairy-free frostings (especially those with coconut oil) should not sit at room temperature for more than 2 hours; refrigerate leftovers promptly.
Variations
Chocolate Birthday Cake
Replace ¼ cup (30 g) of the flour with ¼ cup (25 g) unsweetened cocoa powder. Add 2 tbsp (30 ml) extra dairy-free milk. Bake as directed; the chocolate version may need 1–2 minutes less.
Lemon Birthday Cake
Add 1 tbsp (15 ml) lemon zest and increase the lemon juice to 2 tbsp (30 ml). Omit the vanilla and use 1 tsp lemon extract if you have it. This pairs well with a simple dairy-free glaze made from powdered sugar and lemon juice.
Egg-Free Version
For a vegan cake, replace each egg with 1 tbsp (15 ml) ground flaxseed mixed with 3 tbsp (45 ml) water, and let the mixture sit for 5 minutes. The cake will be slightly denser and may need 2–3 extra minutes of baking. Check that your dairy-free milk and frosting are also vegan.
Why This Cake Works
Gluten-free cakes often turn out gummy or dry. This recipe uses a blend of baking powder and baking soda for lift, and the acid from the lemon juice activates the baking soda. The oil keeps the crumb moist without dairy. The xanthan gum in the flour blend provides structure that mimics gluten. For best results, measure the flour by weight and let the cake cool completely before frosting—warm cake will melt the frosting.
If your gluten-free flour blend does not contain xanthan gum, add 1 teaspoon to the dry ingredients. Without it, the cake may crumble when sliced. For a nut-free version, use oat milk or rice milk instead of almond milk; check the label on your flour blend for nut contamination if that matters to your guests.
Related
- Gluten Free Birthday Cake Recipe
- Gluten Free Birthday Cake M&S Style
- Free E Card Birthday Cake: How to Send One
Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.
Spotted an error? Tell us and we will correct it (corrections policy).