Skip to main content
Zimt

Home baking recipes and cinnamon favourites

Custard Bars Recipe: Creamy, Easy, No-Fail

These custard bars are the perfect intersection of a creamy, rich vanilla custard and a sturdy, buttery shortbread crust. Unlike many bar recipes that rely on a complicated pastry cream, this version uses a simple stovetop custard that sets beautifully in the refrigerator, creating a clean, sliceable bar that holds its shape without being rubbery. The contrast between the crisp, slightly salty crust and the smooth, melt-in-your-mouth custard is what makes these bars so addictive. They're a fantastic make-ahead dessert for potlucks, bake sales, or just a special weekend treat, and they require no special equipment or hard-to-find ingredients.

Ingredients

  • For the Crust:
  • 1 ½ cups (190g) all-purpose flour
  • ½ cup (100g) granulated sugar
  • ½ teaspoon salt
  • ¾ cup (170g) unsalted butter, cold and cut into small cubes
  • 1 large egg yolk
  • 1 teaspoon vanilla extract
  • For the Custard Filling:
  • 2 cups (480ml) whole milk
  • ½ cup (100g) granulated sugar
  • ¼ cup (30g) cornstarch
  • ¼ teaspoon salt
  • 4 large egg yolks
  • 2 tablespoons unsalted butter
  • 2 teaspoons vanilla extract
  • For the Topping (optional, but recommended):
  • 1 cup (120g) powdered sugar
  • 2-3 tablespoons milk or heavy cream
  • ½ teaspoon vanilla extract

Instructions

  1. Prepare the crust: Preheat your oven to 350°F (175°C). Line an 8x8-inch baking pan with parchment paper, leaving some overhang on two opposite sides to make lifting the bars out easy. In a medium bowl, whisk together the flour, sugar, and salt. Add the cold cubed butter and use a pastry blender or your fingertips to work the butter into the flour until the mixture resembles coarse meal with a few pea-sized butter pieces. Add the egg yolk and vanilla, and stir with a fork until the dough starts to come together. It will be crumbly, but should hold together when squeezed.
  2. Press and bake the crust: Press the dough evenly into the bottom of the prepared pan. Use the bottom of a measuring cup to press it firmly and make it as level as possible. Bake for 18-22 minutes, or until the edges are lightly golden and the center looks dry and set. Remove from the oven and let it cool completely on a wire rack. The crust must be fully cool before adding the custard, or the warm crust will cause the custard to curdle at the edges.
  3. Make the custard: While the crust cools, prepare the custard. In a medium saucepan, whisk together the sugar, cornstarch, and salt. Whisk in the egg yolks until the mixture is smooth and pale yellow. Gradually whisk in the milk, making sure there are no lumps at the bottom of the pan.
  4. Cook the custard: Place the saucepan over medium heat. Cook, stirring constantly with a whisk or a heatproof spatula, scraping the bottom and corners of the pan. The mixture will start thin, then gradually thicken. Keep stirring until it comes to a gentle boil and becomes thick, like a pudding. This should take about 5-7 minutes. Once it's boiling, continue to stir and cook for exactly 1 minute more. This step is crucial to cook out the cornstarch and ensure the custard sets properly. Remove from heat.
  5. Finish the custard: Immediately stir in the butter and vanilla extract. Stir until the butter is completely melted and the custard is smooth. If you want a perfectly smooth texture, you can press the custard through a fine-mesh sieve into a clean bowl to remove any cooked egg bits.
  6. Assemble the bars: Pour the hot custard over the cooled crust. Use an offset spatula to spread it evenly to the edges. Tap the pan gently on the counter a few times to release any air bubbles. Let the custard cool to room temperature on the counter, then cover the pan with plastic wrap and refrigerate for at least 4 hours, or preferably overnight. The custard needs this time to fully set and firm up for clean slicing.
  7. Make the glaze (optional): In a small bowl, whisk together the powdered sugar, 2 tablespoons of milk or cream, and vanilla. Add more liquid, a teaspoon at a time, until you have a smooth, pourable glaze. If it's too thin, add more powdered sugar.
  8. Slice and serve: Once the bars are fully chilled and set, use the parchment overhang to lift the entire block out of the pan. Place it on a cutting board. Pour the glaze over the top and spread it gently. Let the glaze set for a few minutes. Use a sharp, thin-bladed knife to cut into squares. For the cleanest cuts, wipe the knife with a damp paper towel between each slice.

Tips

  • Don't skip the cooling time: The custard must be fully chilled before you slice. If you try to cut it too early, it will be soft and messy. Patience is key here, so plan to make these at least 6 hours ahead of when you need them.
  • Stir constantly: When making the custard, do not walk away from the saucepan. The mixture can easily scorch on the bottom or become lumpy if you stop stirring. Use a flat-bottomed spatula to scrape the bottom and sides of the pan as you go.
  • Substitutions: For a richer custard, you can substitute half-and-half or a mix of milk and cream for the whole milk. For a dairy-free version, use full-fat oat milk or coconut milk and a vegan butter substitute in both the crust and custard. The texture will be slightly different, but it will still work.
  • Common mistake: A soggy crust is usually caused by adding warm custard to a warm crust, or by not baking the crust long enough. Make sure the crust is completely cool and the custard is hot when you pour it. The hot custard will slightly soften the crust, but it should not make it soggy if the crust was baked properly.

Serving Suggestions

These custard bars are delicious on their own, but they also pair wonderfully with a cup of strong coffee or a glass of cold milk. For a more decadent dessert, serve them with a dollop of freshly whipped cream and a few fresh berries, like raspberries or sliced strawberries, which cut through the sweetness. You can also dust the bars with a little cinnamon or nutmeg before serving for a warm spice note. If you skip the glaze, they make a great addition to a brunch spread alongside fresh fruit and pastries.

Variations

  • Chocolate Custard Bars: Add 4 ounces of chopped dark chocolate to the hot custard after you remove it from the heat, and stir until melted. For the crust, replace 2 tablespoons of the flour with unsweetened cocoa powder for a chocolate shortbread base.
  • Lemon Custard Bars: Add the zest of one large lemon to the sugar and cornstarch mixture before adding the egg yolks. Replace the vanilla extract in the custard with 1 tablespoon of fresh lemon juice. The glaze can also be made with lemon juice instead of milk for a tangy finish.
  • Coconut Custard Bars: Use full-fat coconut milk instead of whole milk in the custard. Toast ½ cup of shredded coconut and sprinkle it over the top of the custard before chilling. This adds a lovely texture and tropical flavor.
  • Berry Swirl Custard Bars: After pouring the custard into the pan, drop small spoonfuls of your favorite berry jam (about ¼ cup total) over the top. Use a knife to gently swirl the jam into the custard, creating a marbled effect. Chill as directed.

Storage and Reheating

Store the custard bars in an airtight container in the refrigerator. They will keep well for up to 4 days. Because they are a custard-based dessert, they should always be kept cold. To store, place a piece of plastic wrap directly on the surface of the cut bars to prevent a skin from forming. These bars are meant to be served cold, so there is no need to reheat them. In fact, they will lose their shape if you warm them up. If you prefer a softer texture, you can let them sit at room temperature for 10-15 minutes before serving, but don't leave them out for more than 2 hours total due to the dairy and eggs. You can also freeze the bars (without the glaze) for up to 2 months. Wrap the entire block tightly in plastic wrap and then foil. Thaw in the refrigerator overnight before glazing and slicing.

Frequently Asked Questions

Can I use a 9x13-inch pan instead? Yes, you can double the recipe and use a 9x13-inch pan. The baking time for the crust will be about the same, but the custard will be slightly thinner, so it may set a little faster. Keep an eye on it and reduce the chilling time if needed.

Why is my custard lumpy? Lumps usually happen when the cornstarch isn't fully dissolved before heating, or when the heat is too high and the mixture cooks too quickly. Always whisk the cornstarch with the sugar and egg yolks thoroughly before adding the milk. Also, make sure to stir constantly and scrape the bottom of the pan. If you do end up with lumps, you can strain the custard through a fine-mesh sieve before pouring it into the pan.

Can I make these bars gluten-free? Absolutely. Use a 1:1 gluten-free all-purpose flour blend in the crust. The custard is naturally gluten-free. Just make sure your blend contains xanthan gum, or add ½ teaspoon to the flour mixture, to help the crust hold together.

How do I get clean, neat slices? The key is to use a sharp knife and wipe it clean between each cut. You can also dip the knife in hot water and dry it off before slicing, which helps melt through the custard cleanly. Let the bars chill for the full recommended time, and don't press down too hard—use a gentle sawing motion.

My custard didn't set. What went wrong? This usually happens if the custard wasn't cooked long enough. The mixture needs to come to a full boil and cook for a minute to activate the cornstarch. If you only heat it until it thickens slightly, it won't set firmly. Also, make sure you are measuring the cornstarch correctly—a packed or heaping spoonful can throw off the ratio.

Can I use a different type of milk? Yes, 2% or skim milk will work, but the custard will be slightly less rich and creamy. Non-dairy milks like almond or soy will also work, but they may produce a thinner custard. For the best results, stick with whole milk or a blend of milk and cream.

Read next