Dinners

Homemade Dessert Bars From Scratch: Classic Lemon Bar Recipe

Updated · By Stir & Share

Total timeincludes chilling, rising or resting
3 hr 5 min
Prep
20 min
hands-on
Cook
45 min
oven or stovetop
Serves
16
as written

Jump to recipe Save

Homemade dessert bars from scratch offer a crisp, buttery shortbread crust topped with a bright, tangy lemon filling. These classic bars are ideal for potlucks, holiday gatherings, or a quick weeknight treat that feels special without the fuss.

Ingredients

  • 1 cup (115 g) unsalted butter, softened to room temperature
  • 1/2 cup (60 g) powdered sugar (confectioners’ sugar)
  • 1 teaspoon vanilla extract
  • 1 1/2 cups (190 g) all-purpose flour
  • 1/4 teaspoon salt
  • 4 large eggs, at room temperature
  • 1 1/2 cups (300 g) granulated sugar
  • 1/3 cup (40 g) all-purpose flour
  • 1/2 cup (60 g) fresh lemon juice (about 3-4 lemons)
  • Zest of 2 large lemons
  • Powdered sugar for dusting (optional)

Choose Your Pan Before You Mix

You need an 8×8-inch (20×20 cm) square baking pan for this recipe. Using a larger pan will result in thin bars that are difficult to cut and prone to burning. Line your pan with parchment paper, leaving an overhang on two opposite sides. This creates “handles” to lift the entire block of baked bars out of the pan once cooled, making slicing clean and easy.

Make the Shortbread Crust

  1. Preheat your oven to 350°F (175°C). Grease your lined 8×8-inch pan lightly if needed, though the parchment usually suffices.
  2. In a medium bowl, whisk together 1 1/2 cups (190 g) flour and 1/4 teaspoon salt until combined.
  3. In a separate large bowl, beat 1 cup (115 g) softened butter, 1/2 cup (60 g) powdered sugar, and 1 teaspoon vanilla extract until creamy and smooth. This takes about 2 minutes with a hand mixer.
  4. Add the flour mixture to the butter mixture. Stir gently with a spatula or mix on low speed just until a dough forms. Do not overmix, or the crust will become tough instead of crumbly and tender.
  5. Press the dough firmly and evenly into the bottom of your prepared pan. Use the bottom of a measuring cup to flatten it tightly. A compact crust prevents the filling from seeping through.
  6. Bake the crust for 18-20 minutes, or until the edges are lightly golden. Remove from the oven but leave the oven on.

Whisk the Lemon Filling

While the crust bakes, prepare the filling. In a large bowl, whisk 4 large eggs vigorously until they are uniform in color and slightly frothy. Add 1 1/2 cups (300 g) granulated sugar and whisk until the mixture is pale yellow and thickened, about 2 minutes. This step incorporates air and ensures the sugar dissolves completely, preventing a gritty texture.

Stir in 1/3 cup (40 g) flour, 1/2 cup (60 g) fresh lemon juice, and the zest of 2 lemons. Whisk until the batter is completely smooth and no lumps remain. The acidity of the lemon juice will react slightly with the flour, so ensure there are no dry pockets.

Bake Until Set

  1. Pour the lemon filling immediately over the hot baked crust. The residual heat helps the layers bond.
  2. Return the pan to the oven and bake for 20-25 minutes. The bars are done when the center is set and no longer jiggles like liquid when you shake the pan gently. The top may have a few light golden spots, which is normal.
  3. Remove from the oven and let the bars cool in the pan on a wire rack for at least 1 hour. They must be completely cool before you attempt to slice them, or they will crumble.

Cut and Dust

Once cool, use the parchment overhang to lift the slab out of the pan. Place it on a cutting board. For clean cuts, use a sharp chef’s knife and wipe the blade between each slice. Cut into 16 squares (4×4 grid). Dust lightly with powdered sugar just before serving for a professional finish.

Substitutions and Ratios

If you cannot find fresh lemons, you can use bottled lemon juice, but the flavor will be less vibrant. Use a 1:1 ratio by volume. For a richer flavor, substitute half the granulated sugar with brown sugar, though this will darken the filling slightly. If you prefer a thicker crust, increase the flour to 1 3/4 cups (220 g) and reduce the butter to 3/4 cup (170 g), but the texture will be more cookie-like than shortbread.

Serving and Pairing Ideas

Lemon bars pair well with black tea, coffee, or a glass of cold milk. The tartness of the lemon balances rich beverages. For a party setting, arrange the bars on a platter with fresh berries like raspberries or strawberries to add color and a complementary fruit flavor. They also make excellent lunchbox additions when wrapped individually in plastic wrap.

Scaling Table

Batch Size Butter (cup/g) Flour (cup/g) Eggs Sugar (cup/g)
Half Batch 1/2 (57g) 3/4 (95g) 2 3/4 (150g)
Double Batch 2 (230g) 3 (380g) 8 3 (600g)

Note: When doubling, use two 8×8-inch pans or a 9×13-inch pan. Baking time may increase by 5-10 minutes. Check for doneness by the jiggle test rather than relying solely on time.

Storage and Safety

Because these bars contain eggs and dairy, they are perishable. Refrigerate leftovers within 2 hours of baking. Store in an airtight container in the refrigerator for up to 5 days. The cold temperature helps the filling set firmly, making them easier to handle. For longer storage, freeze the bars for up to 3 months. Wrap individual slices in plastic wrap and place them in a freezer-safe bag. Thaw overnight in the refrigerator before serving.

Raw flour and raw eggs carry a risk of bacterial contamination. While the baking process cooks the eggs thoroughly, avoid tasting the raw batter. If you wish to eat raw dough, use heat-treated flour (heated to 160°F / 71°C) and pasteurized eggs. Pregnant individuals, young children, older adults, and those with weakened immune systems should strictly avoid consuming any raw flour or egg mixtures.

Related

Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.

Spotted an error? Tell us and we will correct it (corrections policy).