Moist Dairy-Free Cupcake Recipe with Vegan Frosting

My dairy-free cupcakes have a tender, delicate crumb and a rich, creamy buttercream frosting made without dairy. If you’re craving a simple, comforting sweet treat, this easy dairy-free vanilla cupcake recipe is a perfect choice.

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 information on August 11, 2023.

Ingredients

This dairy-free vanilla cupcake recipe uses simple, easy-to-find ingredients. Below are what you’ll need for the cupcakes and for the vegan vanilla buttercream.

  • All-purpose flour – Plain white flour works well. You can use cake flour as an alternative if you prefer a lighter texture.
  • Cornstarch – Helps keep the crumb tender. Potato starch is a fine substitute if needed.
  • Fine salt – Fine salt dissolves easily in batter.
  • Baking soda & baking powder – Both help the cupcakes rise properly.
  • Granulated sugar – Use regular cane sugar or caster sugar if you have it on hand.
  • Vegan butter – Choose a butter substitute that is about 80% fat for best texture.
  • Neutral oil – Avocado, grapeseed, sunflower, or vegetable oil will work.
  • Eggs – For structure and binding.
  • Mayonnaise – Acts like a dairy-free sour cream by adding acidity and moisture; it reacts with baking soda to help create a light crumb. Any thick mayonnaise without dairy will do.
  • Vanilla extract or paste – For flavor.
  • Unsweetened dairy-free milk – Soy, oat, almond, or other plain plant milk.
Ingredients for making dairy-free vanilla cupcakes laid out on a white table.

For the vegan vanilla bean buttercream:

  • Shortening – Adds stability to the frosting. You can substitute extra vegan butter if preferred.
  • Powdered sugar (confectioners’ sugar) – Essential for silky, smooth buttercream.
  • Vanilla bean (or vanilla paste/extract) – For the deepest vanilla flavor and the characteristic specks in the frosting.
Ingredients for making vegan vanilla buttercream frosting laid out on a white table.

How To Make Dairy-Free Cupcakes

These dairy-free cupcakes are straightforward to make and follow the same basic steps as traditional cupcakes.

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

Step 2: Dry ingredients + butter. In a large bowl whisk together the all-purpose flour, cornstarch, salt, baking soda, baking powder, and granulated sugar. Add the softened vegan butter and work it into the dry ingredients 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 together the oil, eggs, mayonnaise, and vanilla extract until smooth. Stir this mixture into the dry ingredients and combine gently.

Step 4: Finish the batter. Add the dairy-free milk and mix until you have a smooth, even batter. Scrape the bowl to make sure everything is incorporated.

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. Spoon the batter into the liners, filling each about ½ to ⅔ full. Bake for approximately 18 minutes. Test with a toothpick; if it comes out with wet batter, bake for an extra minute or two.

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 rest in the pan for one minute, then transfer them to a wire rack to cool completely before frosting.

Step 7: Make the buttercream. Beat softened vegan butter and shortening until light and fluffy. Gradually add powdered sugar, scraping the bowl between additions. Fold in vanilla seeds or paste and a pinch of salt. Adjust sweetness to taste.

Step 8: Frost. Pipe or spread the buttercream on completely cooled cupcakes. If the cupcakes are even slightly warm, the frosting will soften and may slide off.

Making Gluten-Free Vanilla Cupcakes

To make these cupcakes gluten-free as well as dairy-free, substitute an equal amount of a 1:1 gluten-free flour blend that contains xanthan gum. Follow these tips for the best results:

  • After the batter comes together, mix for an additional 2 minutes to build structure.
  • Let the batter rest for 30 minutes so the gluten-free flours hydrate fully.
  • Preheat the oven while the batter rests to avoid long preheat cycles.
  • Cool gluten-free cupcakes completely before tasting or frosting; they continue to set 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 (eggs, butter substitute, milk) so everything blends evenly without overmixing.
  • Scrape the bowl between additions to ensure a uniform batter.
  • Cool completely before frosting to keep buttercream stable.
  • Portion batter consistently with an ice cream scoop or cookie scoop for even cupcakes.
  • Choose quality cupcake liners to prevent sticking and preserve appearance.

Storage Instructions

Refrigerator: Store baked cupcakes in an airtight container in the fridge for up to 3 days. Allow them to sit at room temperature for 15–20 minutes before serving to soften the frosting.

Freezer: Chill frosted cupcakes until the frosting firms, then wrap each one tightly and place in an airtight container. Freeze for up to one month. Thaw overnight in the refrigerator, then bring to room temperature for 15–20 minutes 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 dairy-free cupcakes both vegan and gluten-free?

To make them vegan, you would need to replace the eggs. Egg-free, gluten-free baking can be tricky because eggs contribute structure and lift. If you experiment with egg replacements (such as commercial egg replacers, flax “eggs,” or aquafaba), test one small batch first. Notes on texture and rise will vary with each substitute.

More Dairy-Free Dessert Recipes

  • Dairy-free peanut butter cookies — chewy with a crisp edge and soft center.
  • Dairy-free lemon bars — a bright, tangy lemon curd on a shortbread base.
  • Dairy-free pumpkin pie — silky filling perfect for autumn gatherings.

More Cupcakes

  • Chocolate cupcakes — moist and fluffy chocolate cake with rich frosting.
  • Carrot cake cupcakes — topped with a lemony cream cheese-style frosting.
  • Matcha cupcakes — lightly sweet with subtle matcha flavor.
  • Chocolate peanut butter cupcakes — for anyone who loves that classic combination.

Thanks for reading! I hope you enjoy this Dairy-Free Vanilla Cupcakes recipe. If you try it, take a photo and save it for later—cupcakes are always worth sharing.

Dairy-Free Vanilla Cupcakes

Prep Time: 10 minutes | Cook Time: 18 minutes | Total Time: 28 minutes

Servings: 16 cupcakes | Calories (approx): 300 kcal each

Ingredients

Vanilla cupcakes

  • 1 1/3 cup all-purpose flour
  • 1/3 cup cornstarch
  • 1/2 teaspoon fine salt
  • 1/2 teaspoon baking soda
  • 2 teaspoons baking powder
  • 1 cup granulated sugar
  • 1/2 stick vegan butter, softened
  • 1/4 cup neutral oil
  • 2 large eggs
  • 1/3 cup mayonnaise (dairy-free)
  • 4 teaspoons vanilla extract
  • 2/3 cup unsweetened dairy-free milk

Vanilla buttercream frosting

  • 2 sticks vegan butter, softened
  • 1/3 cup shortening (or additional vegan butter)
  • 3 cups powdered sugar
  • Vanilla bean seeds or vanilla paste (about 1–2 teaspoons)
  • 1/4 teaspoon fine salt

Instructions

  1. Preheat oven to 340°F (170°C) and line a 12-cup or 16-cup muffin tin with liners.
  2. Whisk together flour, cornstarch, salt, baking soda, baking powder, and sugar. Cut in softened vegan butter until the mixture resembles coarse sand.
  3. In a separate bowl, whisk oil, eggs, mayonnaise, and vanilla until smooth. Stir into the dry ingredients.
  4. Mix in dairy-free milk until batter is smooth. Scrape the bowl.
  5. Divide batter into liners, filling each 1/2 to 2/3 full. Bake for about 18 minutes or until a toothpick comes out clean or with a few moist crumbs.
  6. Cool in the pan for 1 minute, then transfer to a wire rack to cool completely.
  7. Make the frosting: beat vegan butter and shortening until light and fluffy. Gradually add powdered sugar, then vanilla seeds and salt. Adjust consistency with a splash of dairy-free milk if needed.
  8. Frost cooled cupcakes and serve. Store as directed above.