How to Make Dairy-Free Cupcakes

My dairy-free cupcakes have a tender, delicate crumb and a rich, creamy vanilla buttercream that’s completely dairy-free. This easy dairy-free cupcake recipe is perfect when you want a classic vanilla treat without milk or butter from animals.

Side on shot of dairy-free vanilla cupcakes on a wooden cake stand with a jar of forks and a large jug in the background.

This recipe was originally published on January 6, 2023 and updated with new photos and notes on August 11, 2023.

Ingredients

These dairy-free vanilla cupcakes use simple pantry ingredients you can find at most grocery stores. The list below covers the cupcakes and the dairy-free vanilla buttercream.

  • All-purpose flour – Plain white flour works well; cake flour can be substituted if you also adjust the cornstarch.
  • Cornstarch – Helps create a lighter, more tender crumb. Potato starch can be used if corn is not an option.
  • Fine salt – Dissolves quickly into the batter for even seasoning.
  • Baking soda & baking powder – Both leaveners are used to ensure good rise and texture.
  • Granulated sugar – Use organic cane or superfine sugar if you prefer.
  • Vegan butter – Choose a vegan butter that is approximately 80% fat for the best texture.
  • Neutral oil – Avocado, grapeseed, sunflower, or vegetable oil are good choices.
  • Eggs – Provide structure and help the cupcakes hold their shape.
  • Mayonnaise – Acts like a dairy-free sour cream substitute; it reacts with baking soda to add lift and moisture.
  • Vanilla extract – Pure vanilla extract or vanilla paste gives clean vanilla flavor.
  • Unsweetened dairy-free milk – Any plain or vanilla plant milk (soy, oat, almond) will work.
Ingredients for making dairy-free vanilla cupcakes laid out on a white table.

For the vegan vanilla buttercream, you will also need:

  • Shortening – Adds stability to the frosting; you can substitute an equal amount of vegan butter if you prefer.
  • Powdered sugar – Also called confectioners’ sugar; it creates a smooth, silky buttercream.
  • Vanilla bean – Scrape the seeds for intense flavor and pretty flecks; vanilla paste or extract can be used instead.
Ingredients for making vegan vanilla buttercream frosting laid out on a white table.

How To Make Dairy-Free Cupcakes

These dairy-free cupcakes come together much like regular cupcakes. Follow these clear steps for a reliable result.

Step 1: Prep. Preheat your oven to 340°F (170°C) and line a 12- or 16-cup cupcake pan with paper liners.

Step 2: Dry ingredients + butter. In a large bowl, whisk the flour, cornstarch, fine salt, baking soda, baking powder, and granulated sugar. Add the softened vegan butter and work it in with a pastry cutter or your fingers until the mixture resembles coarse sand.

Dry ingredients whisked together in a clear glass mixing bowl.

Step 3: Wet ingredients. In a separate bowl, whisk the oil, eggs, mayonnaise, and vanilla until smooth. Stir the wet mixture into the dry ingredients until just combined.

Step 4: Finish the batter. Stir in the dairy-free milk until the batter is smooth, scraping the sides and bottom of the bowl to make sure everything is combined.

Dry ingredients added to wet ingredients for making dairy-free cupcakes, but the batter is still thick and lumpy because the dairy-free milk is yet to be added.
Completed dairy free vanilla cupcake batter in a clear mixing bowl with a black-handled whisk.

Step 5: Bake. Divide the batter into the liners, filling each about ½ to ⅔ full. Bake for about 18 minutes at 340°F (170°C). Insert a toothpick in the center; if it comes out clean or with a few moist crumbs, they are done. Allow cupcakes to cool in the pan for 1 minute, then transfer to a wire rack to cool completely.

Muffin tin filled with white paper liners and dairy-free vanilla cupcake batter before baking.
Muffin tin filled with 6 perfectly baked dairy-free vanilla cupcakes.

Step 6: Cool. Let the cupcakes cool completely on a wire rack before you frost them. Frosting warm cupcakes can cause the buttercream to melt and slide.

Step 7: Make the vegan buttercream. Beat the softened vegan butter and shortening until light and fluffy, then gradually beat in powdered sugar until you reach your preferred sweetness and texture. Add scraped vanilla seeds or paste for the best flavor and speckled appearance.

Step 8: Frost. Pipe or spread the buttercream onto fully cooled cupcakes. Decorate as desired and serve at room temperature for the best texture.

Making Gluten-Free Vanilla Cupcakes

If you need these cupcakes to be both dairy-free and gluten-free, swap the all-purpose flour for a 1-to-1 gluten-free baking blend that includes xanthan gum. Use the same volume called for the original recipe.

For best gluten-free results:

  • After the batter comes together, mix an extra 2 minutes to help develop structure.
  • Rest the batter 30 minutes so the gluten-free flours hydrate and the texture smooths out.
  • Preheat the oven while the batter rests so you don’t lose preheat time.
  • Cool completely before tasting or frosting; gluten-free baked goods finish setting as they cool.
A dairy-free vanilla cupcake with the wrapper pulled off to expose the texture of the cake.

Expert Tips

  • Use room-temperature ingredients so everything blends smoothly and you avoid overmixing.
  • Scrape the bowl between additions to ensure even mixing and consistent batter.
  • Frost only cooled cupcakes—even slightly warm cakes will cause frosting to slip.
  • Use a cookie scoop or ice cream scoop for even portions and consistent bake times.
  • Choose good-quality liners to prevent sticking and to present clean cupcakes.

Storage Instructions

Refrigeration: Store baked cupcakes in an airtight container in the refrigerator for up to 3 days. Bring to room temperature for 15–20 minutes before serving so the frosting softens.

Freezing: Freeze frosted cupcakes by chilling them until the buttercream firms, wrapping each one tightly, and placing them in an airtight container or freezer bag for up to one month. Thaw overnight in the refrigerator, then bring to room temperature before serving.

A dairy free vanilla cupcake topped with dairy free vanilla buttercream on a wooden stand, sliced in half to show the fluffy and tender crumb.

FAQs

Can I make these cupcakes both vegan and gluten-free?

The recipe as written uses eggs, so it is not fully vegan. Converting the recipe to be both egg-free and gluten-free requires careful substitutions (for example, commercial egg replacers or flax/chia eggs) and may affect texture. If you try an egg-free version, allow extra testing time and note that results can vary depending on the replacer used.

More Dairy-Free Dessert Recipes

  • Dairy-free peanut butter cookies — chewy with a crisp edge and soft center.
  • Dairy-free lemon bars — a buttery shortbread crust with bright lemon filling.
  • Dairy-free pumpkin pie — silky filling for a classic fall dessert.

More Cupcakes

  • Chocolate cupcakes — moist and fluffy for chocolate lovers.
  • Carrot cake cupcakes — topped with a bright lemony cream cheese-style frosting.
  • Matcha cupcakes — subtly floral and paired nicely with white chocolate flavors.
  • Chocolate peanut butter cupcakes — a rich pairing for fans of chocolate and peanut butter.

Thanks for reading! I hope this Dairy-Free Vanilla Cupcake guide helps you bake a batch of tender, flavorful cupcakes. Enjoy experimenting with the frosting and toppings to make them your own.