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:
- 3/4 cup white sugar
- 1 tbsp packed lemon zest
- 1 1/2 cups cake flour
- 1/3 cup finely chopped pistachios
- 2 tsp baking powder
- 1/2 tsp fine sea salt
- 6 tbsp unsalted butter, cut in cubes and at room temperature
- 1/2 cup sour cream, at room temperature
- 1/2 cup whole milk, at room temperature
- 1/3 cup vegetable oil
- 1 large egg, at room temperature
- 2 tbsp fresh lemon juice
- 1 tsp vanilla extract
For the raspberry compote:
- 3 cups raspberries, fresh or frozen
- 1/4 cup white sugar
- 2 tsp fresh lemon juice
- 1 tbsp plus 1 tsp cornstarch
- 1 tbsp water
For the lemon frosting:
- 1 1/2 cups unsalted butter, room temperature
- 2 cups powdered sugar
- 3 tbsp heavy cream
- 1 tbsp lemon juice, freshly squeezed
- 2 tsp lemon zest
For garnish:
- Chopped pistachios
- Fresh raspberries
Step 1: Prepare the Cupcake Pan and Ingredients
Line a 12-cup cupcake pan with paper liners and preheat your oven to 350°F (180°C).
Gather all your ingredients, ensuring the butter, sour cream, milk, and egg are at room temperature for the best results.
Step 2: Make the Lemon Pistachio Cupcake Batter
- 3/4 cup white sugar
- 1 tbsp packed lemon zest
- 1 1/2 cups cake flour
- 1/3 cup finely chopped pistachios
- 2 tsp baking powder
- 1/2 tsp fine sea salt
- 6 tbsp unsalted butter, cut in cubes and at room temperature
- 1/2 cup sour cream, at room temperature
- 1/2 cup whole milk, at room temperature
- 1/3 cup vegetable oil
- 1 large egg, at room temperature
- 2 tbsp fresh lemon juice
- 1 tsp vanilla extract
Rub the lemon zest into the white sugar with your fingers until it resembles wet sand.
In a stand mixer bowl, whisk together the cake flour, lemon sugar (sugar mixed with zest), finely chopped pistachios, baking powder, and sea salt.
Add the cubed butter and mix on low speed for about 3 minutes, until the mixture looks like coarse sand.
In a separate bowl, whisk together the sour cream, whole milk, vegetable oil, egg, vanilla extract, and fresh lemon juice.
Gradually mix the wet ingredients into the dry mixture, scraping down the sides, and continue mixing until just combined.
Scoop the batter into the cupcake liners, filling each about 3/4 full.
I always find using an ice cream scoop makes this step tidier and ensures even cupcakes.
Step 3: Bake and Cool the Cupcakes
Bake the cupcakes in the preheated oven for 15-20 minutes, or until a toothpick inserted into the center comes out with a few moist crumbs attached.
Allow the pan to cool on a wire rack for 5 minutes.
Then remove the cupcakes from the pan and let them continue to cool completely on the rack.
Step 4: Prepare the Raspberry Filling
- 3 cups raspberries, fresh or frozen
- 1/4 cup white sugar
- 2 tsp fresh lemon juice
- 1 tbsp plus 1 tsp cornstarch
- 1 tbsp water
To make the raspberry compote filling, combine the raspberries, white sugar, and fresh lemon juice in a saucepan over medium heat.
Mash the raspberries occasionally as they cook, until the mixture is bright red and bubbly, about 10-12 minutes.
Whisk together the cornstarch and water, then stir this mixture into the raspberries.
Cook for another 1-2 minutes until the filling thickens, then let cool completely before using.
I like to taste the compote here and adjust the lemon juice if I want it a bit tangier.
Step 5: Make the Lemon Buttercream Frosting
- 1 1/2 cups unsalted butter, room temperature
- 2 cups powdered sugar
- 3 tbsp heavy cream
- 1 tbsp lemon juice, freshly squeezed
- 2 tsp lemon zest
Cream the room-temperature butter using a mixer until smooth and creamy.
Gradually beat in the powdered sugar.
Once it’s well incorporated, add the heavy cream, lemon juice, and lemon zest.
Continue beating the mixture until it’s light and fluffy, about 2-3 minutes.
For a more authentic flavor, I like to use freshly squeezed lemon juice and zest at this point.
Step 6: Core and Fill the Cupcakes, Then Decorate
- raspberry compote from Step 4
- lemon buttercream frosting from Step 5
- Chopped pistachios
- Fresh raspberries
Once the cupcakes are completely cooled, leave them in the pan and carefully core out the centers using a small knife or a cupcake corer.
Fill each cavity with the cooled raspberry compote from Step 4.
Pipe the lemon frosting from Step 5 around the core on top of each cupcake, then add a little more raspberry filling into the center.
Garnish each cupcake with chopped pistachios and fresh raspberries.
It’s easier to core cupcakes while they’re still in the pan—it helps keep the cake intact.

Easy Lemon Cupcakes with Raspberry Filling
Ingredients
For the cupcakes:
- 3/4 cup white sugar
- 1 tbsp packed lemon zest
- 1 1/2 cups cake flour
- 1/3 cup finely chopped pistachios
- 2 tsp baking powder
- 1/2 tsp fine sea salt
- 6 tbsp unsalted butter, cut in cubes and at room temperature
- 1/2 cup sour cream, at room temperature
- 1/2 cup whole milk, at room temperature
- 1/3 cup vegetable oil
- 1 large egg, at room temperature
- 2 tbsp fresh lemon juice
- 1 tsp vanilla extract
For the raspberry compote:
- 3 cups raspberries, fresh or frozen
- 1/4 cup white sugar
- 2 tsp fresh lemon juice
- 1 tbsp plus 1 tsp cornstarch
- 1 tbsp water
For the lemon frosting:
- 1 1/2 cups unsalted butter, room temperature
- 2 cups powdered sugar
- 3 tbsp heavy cream
- 1 tbsp lemon juice, freshly squeezed
- 2 tsp lemon zest
For garnish:
- Chopped pistachios
- Fresh raspberries
Instructions
- Line a 12-cup cupcake pan with paper liners and preheat your oven to 350°F (180°C). Gather all your ingredients, ensuring the butter, sour cream, milk, and egg are at room temperature for the best results.
- Rub the lemon zest into the white sugar with your fingers until it resembles wet sand. In a stand mixer bowl, whisk together the cake flour, lemon sugar (sugar mixed with zest), finely chopped pistachios, baking powder, and sea salt. Add the cubed butter and mix on low speed for about 3 minutes, until the mixture looks like coarse sand. In a separate bowl, whisk together the sour cream, whole milk, vegetable oil, egg, vanilla extract, and fresh lemon juice. Gradually mix the wet ingredients into the dry mixture, scraping down the sides, and continue mixing until just combined. Scoop the batter into the cupcake liners, filling each about 3/4 full. I always find using an ice cream scoop makes this step tidier and ensures even cupcakes.
- Bake the cupcakes in the preheated oven for 15-20 minutes, or until a toothpick inserted into the center comes out with a few moist crumbs attached. Allow the pan to cool on a wire rack for 5 minutes. Then remove the cupcakes from the pan and let them continue to cool completely on the rack.
- To make the raspberry compote filling, combine the raspberries, white sugar, and fresh lemon juice in a saucepan over medium heat. Mash the raspberries occasionally as they cook, until the mixture is bright red and bubbly, about 10-12 minutes. Whisk together the cornstarch and water, then stir this mixture into the raspberries. Cook for another 1-2 minutes until the filling thickens, then let cool completely before using. I like to taste the compote here and adjust the lemon juice if I want it a bit tangier.
- Cream the room-temperature butter using a mixer until smooth and creamy. Gradually beat in the powdered sugar. Once it's well incorporated, add the heavy cream, lemon juice, and lemon zest. Continue beating the mixture until it's light and fluffy, about 2-3 minutes. For a more authentic flavor, I like to use freshly squeezed lemon juice and zest at this point.
- Once the cupcakes are completely cooled, leave them in the pan and carefully core out the centers using a small knife or a cupcake corer. Fill each cavity with the cooled raspberry compote from Step 4. Pipe the lemon frosting from Step 5 around the core on top of each cupcake, then add a little more raspberry filling into the center. Garnish each cupcake with chopped pistachios and fresh raspberries. It's easier to core cupcakes while they're still in the pan—it helps keep the cake intact.