Magic lemon bars layer a buttery shortbread crust with a tangy, creamy lemon filling that sets into neat, sliceable squares. A little sweetened condensed milk gives the filling its smooth texture, while fresh lemon juice and zest keep the bars bright rather than overly sweet.
Ingredients
- 1 cup (125 g) all-purpose flour, spooned into the measuring cup and leveled
- 1/4 cup (50 g) granulated sugar
- 1/4 teaspoon fine salt
- 1/2 cup (113 g) unsalted butter, melted and slightly cooled
- 2 teaspoons finely grated lemon zest, divided
- 1 can (14 ounces/397 g) sweetened condensed milk
- 2 large egg yolks, at room temperature
- 1/2 cup (120 ml) fresh lemon juice, from about 3 to 4 lemons
- 1 tablespoon all-purpose flour
- 1 tablespoon powdered sugar, for serving (optional)
Instructions
- Prepare the pan and oven. Heat the oven to 350°F (175°C). Line an 8-inch square metal baking pan with parchment paper, leaving enough overhang on two opposite sides to lift out the bars. Lightly grease any exposed sides.
- Mix the crust. In a medium bowl, stir together 1 cup flour, granulated sugar, salt, and 1 teaspoon of the lemon zest. Pour in the melted butter and mix until no dry flour remains and the mixture looks like damp crumbs.
- Press and bake the crust. Tip the mixture into the prepared pan and press it firmly into an even layer, including the corners. Use the flat bottom of a measuring cup to compact it. Bake for 16 to 19 minutes, until the edges are lightly golden and the center looks set. Keep the oven on.
- Make the lemon filling. In a clean bowl, whisk the sweetened condensed milk with the egg yolks until smooth. Whisk in the lemon juice, the remaining 1 teaspoon zest, and 1 tablespoon flour. The mixture will thicken slightly as the lemon juice meets the condensed milk. Scrape the sides of the bowl so the filling is evenly mixed.
- Fill and bake. Pour the filling over the hot crust and gently spread it to the edges. Return the pan to the oven and bake for 18 to 22 minutes. The outer edge should look set; the middle may still have a slight, gentle wobble, but it should not appear liquid or ripple when the pan is moved.
- Cool completely. Set the pan on a wire rack and cool to room temperature, about 1 hour. Refrigerate for at least 2 hours, or until thoroughly chilled and firm. Chilling is important for clean cuts and a properly set filling.
- Slice and serve. Lift the slab out using the parchment overhang. With a large sharp knife, cut it into 16 squares, wiping the blade clean between cuts. Dust lightly with powdered sugar just before serving, if desired.
Tips
- Measure the flour lightly. Spoon it into the measuring cup and level the top instead of scooping directly from the bag. Too much flour can make the crust dry and the filling dense.
- Use fresh lemon juice. Bottled juice lacks the fresh aroma that makes the citrus flavor stand out. Zest the lemons before juicing, and take only the yellow outer peel; the white pith tastes bitter.
- Let the crust bake until set. An underbaked crust can turn soft where it meets the filling. If its center still looks wet or greasy after the first bake, give it another minute or two before adding the filling.
- Cool before chilling and cutting. Refrigerating a hot pan can encourage condensation, while cutting warm bars can smear the filling. For especially tidy edges, chill the bars overnight and use a warm, dry knife.
Serving Suggestions
Serve the bars cold or let them stand at room temperature for 10 to 15 minutes for a softer, creamier bite. A light dusting of powdered sugar adds a pretty finish, though it dissolves on moist bars, so add it just before serving. For a simple dessert plate, pair a square with fresh berries, sliced strawberries, or a spoonful of unsweetened whipped cream. Their tart-sweet flavor also works well after a rich meal, alongside coffee or tea.
Variations
For a more pronounced citrus flavor, replace up to 2 tablespoons of the lemon juice with lime juice, or add another teaspoon of lemon zest. To make a ginger version, stir 1/2 teaspoon ground ginger into the crust. You can also swap the lemon for an equal amount of fresh lime juice and zest for lime bars; the filling may taste a little sharper, but the method and baking time stay the same.
For a slightly thicker crust, increase the crust ingredients by half and press the mixture into the same pan; begin checking it a few minutes later, as the thicker layer may need extra baking time. Avoid changing the amount of condensed milk or juice casually: their balance is what gives the filling its set and texture.
Storage and Reheating
Because these bars contain egg and dairy, refrigerate them in an airtight container within 2 hours of baking or serving (within 1 hour if the room is hotter than 90°F/32°C). They keep well in the refrigerator for up to 4 days. Separate layers with parchment to protect the tops. These bars are best served chilled or slightly cool and do not need reheating.
For longer storage, freeze the bars without powdered sugar in a single layer until firm, then wrap individually or place them in a freezer-safe airtight container. Freeze for up to 2 months for best quality. Thaw in the refrigerator overnight, then add powdered sugar if you like. Avoid thawing them for hours at room temperature.
Frequently Asked Questions
Why is the filling still loose?
It may need more baking or chilling. Bake until the edges are set and the center only gently wobbles, then cool completely and refrigerate for at least 2 hours. If it is still runny after chilling, the bars were likely underbaked or the ingredient amounts were off.
Can I use bottled lemon juice?
Fresh juice is strongly recommended for the cleanest flavor, especially because lemon is the main ingredient. If bottled juice is all you have, use the same measured amount, but skip any zest you cannot provide and expect a less aromatic result.
Can I make the bars ahead?
Yes. Bake and chill them a day ahead, keep them covered in the refrigerator, and slice shortly before serving. Add powdered sugar at the last moment so it does not absorb moisture.
Can I use a glass baking dish?
Yes, an 8-inch square glass dish works, but glass heats differently from metal and may need a few extra minutes. Check the crust for lightly golden edges and the filling for a set perimeter rather than relying only on the clock.
How do I know the egg-based filling is fully baked?
The filling should be set around the edges, with only a small, gentle wobble in the center; it should not look wet or slosh when moved. If you use an instant-read thermometer, the center should reach at least 160°F (71°C). Avoid overbaking, which can make the filling tough or cause it to crack.
Can I double the recipe?
Yes. Double every ingredient and bake in a 9-by-13-inch pan. The crust and filling may each need a little longer, so use the visual cues in the instructions; chill the larger slab thoroughly before slicing.