If you ask me, cupcakes with a surprise inside are pure magic.
These lemon cupcakes hide a sweet raspberry filling that bursts with flavor in every bite. The soft lemon cake pairs perfectly with the tart berry center, creating a treat that’s both refreshing and satisfying.
They’re topped with a simple buttercream frosting that lets the lemon and raspberry flavors shine through. A light dusting of lemon zest on top gives each cupcake a fresh finish.
These are perfect for spring gatherings or when you want something a little special for dessert.
Why You’ll Love These Lemon Cupcakes
- Bright, fresh flavors – The combination of zesty lemon and sweet-tart raspberry filling creates a perfect balance that tastes like sunshine in every bite.
- Impressive presentation – These cupcakes look bakery-quality with their colorful raspberry filling, creamy lemon frosting, and pretty pistachio garnish that will wow your guests.
- Made from scratch goodness – Everything is homemade, from the tender lemon cake to the fresh raspberry filling, giving you that satisfying feeling of creating something special.
- Perfect for special occasions – Whether it’s a birthday party, spring gathering, or just because you want something fancy, these cupcakes feel celebratory and special.
- Quick baking time – At just 35-50 minutes total, you can have these beautiful cupcakes ready faster than you might expect for such an elegant dessert.
What Kind of Lemons Should I Use?
For the best flavor in your cupcakes, you’ll want to use fresh lemons rather than bottled lemon juice. Meyer lemons are a great choice if you can find them since they’re sweeter and less acidic than regular lemons, but standard grocery store lemons work perfectly fine too. When picking lemons, look for ones that feel heavy for their size and have bright, unblemished skin – these will give you the most juice and the best zest. Make sure to wash and dry your lemons well before zesting, and try to only zest the yellow part of the peel since the white pith underneath can be bitter.
Options for Substitutions
These lemon cupcakes are pretty forgiving when it comes to swaps, so here’s what you can switch up:
- Cake flour: Don’t have cake flour? Make your own by removing 2 tablespoons from 1 1/2 cups all-purpose flour and adding 2 tablespoons cornstarch. Sift it together a few times to mix well.
- Pistachios: Feel free to swap pistachios with chopped almonds, walnuts, or even leave them out completely if you prefer plain cupcakes.
- Sour cream: Greek yogurt works great as a substitute – just use the same amount. You can also use buttermilk, but reduce the milk to 1/4 cup to keep the right consistency.
- Fresh raspberries: Frozen raspberries work just fine for the filling – no need to thaw them first. You can also try strawberries or blackberries for a different flavor twist.
- Heavy cream: For the frosting, you can substitute with whole milk or even sour cream if you want a tangier buttercream.
- Fresh lemon juice and zest: While fresh is best for that bright flavor, bottled lemon juice can work in a pinch. For zest, you can use 1/2 teaspoon lemon extract instead of each tablespoon of zest.
Watch Out for These Mistakes While Baking
The biggest mistake when making lemon cupcakes is not bringing your ingredients to room temperature first – cold eggs, butter, and sour cream won’t mix properly and can lead to dense, uneven cupcakes that lack the light, fluffy texture you’re after.
Another common error is overmixing the batter once you add the flour, which develops too much gluten and creates tough cupcakes instead of tender ones – mix just until the ingredients are combined.
For the raspberry filling, make sure to cook it long enough for the cornstarch to fully activate and thicken, otherwise you’ll end up with a runny mess that soaks into your cupcakes, and always let both the cupcakes and filling cool completely before assembling to prevent melting your buttercream.
When making the lemon buttercream, add the powdered sugar gradually and beat for at least 3-4 minutes to achieve that smooth, pipeable consistency that won’t weigh down your delicate cupcakes.
What to Serve With Lemon Cupcakes?
These lemon raspberry cupcakes are pretty much perfect on their own, but they’re amazing alongside a cup of hot tea or coffee for an afternoon treat. The bright citrus flavors pair beautifully with Earl Grey tea or a light roast coffee that won’t compete with the lemon. If you’re serving them at a party, consider setting out some fresh berries like strawberries or blueberries to complement the raspberry filling. For a more indulgent dessert spread, vanilla ice cream or lemon sorbet makes a lovely side that echoes the cupcakes’ flavors without being too heavy.
Storage Instructions
Store: These lemon cupcakes with raspberry filling will stay fresh in an airtight container in the fridge for up to 4 days. The buttercream frosting holds up really well, and the raspberry filling actually gets even more flavorful after a day or two. Just let them sit at room temperature for about 15 minutes before serving so the frosting softens up nicely.
Freeze: You can freeze these cupcakes for up to 3 months, which is great for parties or when you want to bake ahead. I like to freeze them without the fresh raspberry and pistachio garnishes, then add those when I’m ready to serve. Wrap each cupcake individually in plastic wrap, then place them in a freezer-safe container.
Thaw: When you’re ready to enjoy your frozen cupcakes, just move them to the fridge overnight to thaw slowly. This keeps the frosting from getting too soft too quickly. Once thawed, add your fresh raspberry and pistachio toppings, and they’ll taste just as good as the day you made them!
| Preparation Time | 20-30 minutes |
| Cooking Time | 15-20 minutes |
| Total Time | 35-50 minutes |
| Level of Difficulty | Medium |
Estimated Nutrition
Estimated nutrition for the whole recipe (without optional ingredients):
- Calories: 3600-4000
- Protein: 30-36 g
- Fat: 230-260 g
- Carbohydrates: 370-410 g
Ingredients
For the cupcakes:
- 1/2 cup whole milk (room temperature)
- 1/2 tsp fine sea salt
- 1/2 cup sour cream (room temperature)
- 1/3 cup pistachios (finely chopped, about 1/4-inch pieces)
- 1 large egg (room temperature)
- 3/4 cup sugar
- 1 1/2 cups cake flour (I use King Arthur cake flour)
- 2 tsp baking powder
- 1 tbsp packed lemon zest (finely grated for best flavor)
- 6 tbsp unsalted butter (cut into cubes, room temperature)
- 1/3 cup vegetable oil
- 1 tsp vanilla extract
- 2 tbsp fresh lemon juice
For the raspberry compote:
- 3 cups raspberries (fresh or frozen, thawed if frozen)
- 1 tbsp plus 1 tsp cornstarch (helps achieve thick, jammy texture)
- 1 tbsp water
- 1/4 cup sugar
- 2 tsp fresh lemon juice
For the lemon frosting:
- 1 1/2 cups unsalted butter (room temperature, about 70°F; I prefer Kerrygold)
- 3 tbsp heavy cream
- 2 tsp lemon zest (freshly grated for bright flavor)
- 2 cups powdered sugar
- 1 tbsp fresh lemon juice
For garnish:
- Fresh raspberries
- Chopped pistachios
Step 1: Prepare Mise en Place and Preheat
- 1 tbsp packed lemon zest
- 1/3 cup pistachios
Line a muffin tin with cupcake liners and preheat your oven to 350°F.
Measure out all ingredients and bring the butter, sour cream, milk, and egg to room temperature—this ensures even mixing and better texture in the final cupcakes.
Finely grate the lemon zest (you’ll need 1 tablespoon for the batter and 2 teaspoons for the frosting), and have your fresh lemon juice ready.
Chop the pistachios into fine, roughly 1/4-inch pieces, being careful not to over-process them into a powder.
Step 2: Make the Dry Ingredient Mixture
- 3/4 cup sugar
- 1 tbsp packed lemon zest
- 1 1/2 cups cake flour
- 1/3 cup pistachios
- 2 tsp baking powder
- 1/2 tsp fine sea salt
- 6 tbsp unsalted butter
In a large bowl, rub the lemon zest into the sugar using your fingertips until the mixture becomes fragrant and slightly moist—this releases the lemon oils and distributes the flavor evenly throughout the batter.
Add the cake flour, chopped pistachios, baking powder, and fine sea salt to the lemon sugar.
Whisk together until well combined, then add the room-temperature butter cubes.
Using an electric mixer on low speed, mix for about 3 minutes until the mixture resembles coarse sand with pea-sized butter pieces throughout.
This texture is crucial because it helps create a tender crumb.
Step 3: Combine Wet Ingredients and Create the Batter
- dry ingredient mixture from Step 2
- 1/2 cup sour cream
- 1/2 cup whole milk
- 1/3 cup vegetable oil
- 1 large egg
- 2 tbsp fresh lemon juice
- 1 tsp vanilla extract
In a separate bowl, whisk together the sour cream, whole milk, vegetable oil, room-temperature egg, vanilla extract, and fresh lemon juice until smooth and fully combined.
Pour the wet mixture into the dry ingredient mixture from Step 2, and fold or stir gently with a spatula until just combined—don’t overmix, as this can develop gluten and create a dense, tough cupcake.
The batter should look slightly lumpy and be fully combined but not over-worked.
Divide the batter evenly among the cupcake liners, filling each about 3/4 full to allow room for rising.
Step 4: Bake the Cupcakes
Place the cupcake tin in the preheated 350°F oven and bake for 15 to 20 minutes, until the tops are pale golden and a toothpick inserted into the center comes out with just a few moist crumbs.
Let the cupcakes cool in the pan for 5 minutes, then turn them out onto a wire rack to cool completely to room temperature.
While the cupcakes cool, begin preparing the raspberry filling.
Step 5: Make the Raspberry Filling
- 3 cups raspberries
- 1/4 cup sugar
- 2 tsp fresh lemon juice
- 1 tbsp plus 1 tsp cornstarch
- 1 tbsp water
In a medium saucepan over medium heat, combine the fresh raspberries (or thawed frozen ones), sugar, and 2 teaspoons fresh lemon juice.
Gently mash the raspberries with a wooden spoon as they heat, breaking them down to release their juices.
Continue cooking for 10 to 12 minutes, stirring occasionally, until the mixture is bubbly and the raspberries have mostly broken down.
In a small bowl, whisk together the cornstarch and water to create a slurry, then stir this into the raspberry mixture.
Cook for another 1 to 2 minutes, stirring constantly, until the filling thickens into a jammy consistency—I like a thick filling because it holds up better when piping and gives you that perfect jammy bite.
Transfer to a bowl and let cool to room temperature before using.
Step 6: Prepare the Lemon Buttercream Frosting
- 1 1/2 cups unsalted butter
- 2 cups powdered sugar
- 3 tbsp heavy cream
- 1 tbsp fresh lemon juice
- 2 tsp lemon zest
Using an electric mixer, beat the room-temperature butter (around 70°F) for about 2 minutes until smooth and creamy.
I prefer using Kerrygold butter because it has a beautiful golden color and rich flavor that really comes through in the frosting.
Gradually add the powdered sugar, beating on low speed to avoid creating a sugar cloud, then increase to medium speed once the sugar is mostly incorporated.
Add the heavy cream, 1 tablespoon fresh lemon juice, and 2 teaspoons freshly grated lemon zest.
Beat for another 2 to 3 minutes on medium-high speed until the frosting is light, fluffy, and holds stiff peaks.
Step 7: Assemble and Garnish the Cupcakes
- cooled cupcakes from Step 4
- raspberry filling from Step 5
- lemon buttercream from Step 6
- Chopped pistachios
- Fresh raspberries
Using a cupcake corer or small paring knife, carefully remove a small cone-shaped piece from the center of each cooled cupcake, creating a cavity for the filling.
Fill each hole with about 1 to 2 teaspoons of the cooled raspberry filling from Step 5.
Transfer the lemon buttercream to a piping bag fitted with your preferred tip and pipe frosting generously onto each cupcake.
Add an additional small dollop of raspberry filling to the center of each frosted cupcake for a pop of color and flavor.
Finish each cupcake with a sprinkle of chopped pistachios and a fresh raspberry on top for an elegant presentation.




