This lemon custard is thick enough to hold its shape inside a Danish without running out, yet soft enough to melt into the pastry. It is made on the stovetop with egg yolks, lemon juice, and butter, so it sets quickly and stays stable at room temperature for a few hours.
Ingredients
- 1/2 cup (100 g) granulated sugar
- 2 tablespoons (16 g) cornstarch
- 1/8 teaspoon fine salt
- 1/2 cup (120 ml) cold water
- 2 large egg yolks, lightly beaten
- 1/4 cup (60 ml) fresh lemon juice (about 2 lemons)
- 1 teaspoon lemon zest (optional, for stronger flavor)
- 2 tablespoons (28 g) unsalted butter, cut into small pieces
Instructions
- In a small saucepan, whisk together the sugar, cornstarch, and salt. Whisk in the cold water until smooth, with no lumps.
- Whisk in the egg yolks and lemon juice. Place the pan over medium heat.
- Cook, stirring constantly with a whisk or silicone spatula, until the mixture thickens and comes to a gentle boil. This takes about 5–7 minutes. The custard should be thick enough to coat the back of a spoon and hold a line when you run a finger through it.
- Once it boils, cook for 1 minute more, stirring constantly. This ensures the cornstarch is fully cooked and the custard will not thin out later.
- Remove the pan from heat. Stir in the lemon zest and butter until the butter is melted and the custard is smooth.
- Pour the custard through a fine-mesh strainer into a bowl to remove any cooked egg bits. Cover with plastic wrap pressed directly onto the surface to prevent a skin from forming.
- Cool to room temperature, about 30 minutes, then use or refrigerate. If you are filling Danish, the custard should be completely cool and slightly thickened before spooning onto the pastry.
Swap the Citrus or the Dairy
You can replace the lemon juice with lime juice for a lime custard, or use half lemon and half orange juice for a softer citrus flavor. Keep the same amount of liquid: 1/4 cup (60 ml) total.
For a richer custard, swap the water for whole milk. That changes the texture to a little creamier, and it will look more opaque. If you use milk, the custard may need 1–2 extra minutes to thicken because milk adds extra liquid.
To make it dairy-free, use a plant-based butter that is solid at room temperature, such as margarine sticks. The custard will still set, but it may be slightly less shiny.
If you do not have cornstarch, use 3 tablespoons (24 g) all-purpose flour instead. Flour gives a more pudding-like texture and takes a few minutes longer to cook. Whisk the flour with the sugar before adding liquid to avoid lumps.
Why It Goes Wrong and How to Fix It
Too Runny
The custard will be too thin if it was not cooked long enough. Cornstarch needs to reach a boil to activate. If you stop at the first sign of thickening, it will thin as it cools. Cook it until it is visibly thick and bubbling, then boil for 1 full minute.
If the custard is already thin after cooling, you can reheat it gently with 1 teaspoon cornstarch dissolved in 1 tablespoon cold water. Whisk it in and cook until it boils again. This works once, but the texture will be slightly less smooth.
Too Dense or Gummy
Overcooking can make the custard stiff and rubbery. The boil should be gentle, not vigorous. If you see large bubbles, lower the heat. Also, using too much cornstarch or flour makes it gummy. Stick to the amounts in the recipe.
Lumpy
Lumps usually come from adding the egg yolks to a hot mixture too quickly, which cooks them into small bits. Always whisk the yolks into the cold liquid before heating. If lumps appear, strain the custard through a fine-mesh sieve. The texture will still be smooth, though a little of the custard is lost.
Skin on Top
A skin forms when the surface dries out. Press plastic wrap directly onto the hot custard before cooling. If a skin does form, whisk it back in before using.
Storing the Custard and Filling the Danish
The custard keeps in the refrigerator for up to 4 days in an airtight container. Press plastic wrap onto the surface if you are not using a lid. Stir it well before using, because it will thicken more when cold.
Do not leave the custard at room temperature for more than 2 hours, or 1 hour if the room is above 90°F (32°C). This includes the time it sits out while you assemble the Danish.
When filling Danish, spoon about 1 tablespoon of custard into the center of each pastry. Do not overfill, or it will spill during baking. The custard will not set further in the oven, so it should be thick enough to hold a mound.
You can freeze the custard for up to 1 month. Thaw it overnight in the refrigerator and whisk well. The texture may be slightly softer after freezing, so it is best for fillings that are baked, like Danish, rather than for serving on its own.
Equipment That Matters
A heavy-bottomed saucepan, such as stainless steel or enameled cast iron, distributes heat evenly and prevents scorching. A thin pan can create hot spots that cook the egg too quickly.
Use a whisk for stirring; it breaks up lumps better than a spoon. A silicone spatula is useful for scraping the corners of the pan.
A fine-mesh strainer is worth the extra step. It catches any tiny cooked egg bits and makes the custard silky.
If you do not have a strainer, you can skip it, but the texture will be slightly less smooth. Just be careful not to overcook the yolks.
This lemon custard is also good on its own as a pudding, spooned over cake, or layered in trifle. For a Danish, it pairs well with cream cheese or a sprinkle of powdered sugar after baking.
Related
- Phyllo Custard Pie Recipe
- Strawberry Shortcake With Custard and German
- Phyllo Custard Pie with Berries Recipe
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).