Skip to main content
Zimt

Home baking recipes and cinnamon favourites

Pastry Cream Cake Filling: Rich, Silky, Foolproof

Pastry cream is the classic cooked custard that turns a plain sponge cake into something bakery-worthy. Its silky texture and vanilla-forward flavor make it a versatile filling for layer cakes, cream puffs, and tarts. The key to success is tempering the eggs and cooking the mixture just until it thickens, so you get a smooth, lump-free cream that holds its shape when sliced.

Ingredients

  • 2 cups (480 ml) whole milk
  • 1/2 cup (100 g) granulated sugar
  • 1/4 cup (30 g) cornstarch
  • 1/4 teaspoon salt
  • 4 large egg yolks
  • 2 tablespoons (28 g) unsalted butter, softened
  • 1 teaspoon vanilla extract

Instructions

  1. In a medium saucepan, combine the milk and half the sugar. Heat over medium heat until steaming and small bubbles appear around the edges; do not boil.
  2. While the milk heats, whisk the remaining sugar, cornstarch, and salt in a medium bowl. Add the egg yolks and whisk until smooth and pale yellow.
  3. Slowly pour about 1/2 cup of the hot milk into the yolk mixture, whisking constantly to temper the eggs. Then pour the tempered mixture back into the saucepan, whisking continuously.
  4. Cook over medium heat, whisking constantly, until the mixture thickens and just begins to bubble, about 3–5 minutes. It should coat the back of a spoon and hold a line when you run your finger through it.
  5. Remove from heat and whisk in the butter and vanilla until smooth.
  6. Pour the pastry cream into a shallow dish and press plastic wrap directly onto the surface to prevent a skin from forming. Refrigerate until completely cool, at least 2 hours or overnight.
  7. Before using as a cake filling, whisk the chilled pastry cream until smooth. If it seems too thick, stir in a tablespoon or two of milk to reach a spreadable consistency.

Tips

  • Prevent lumps: Whisk constantly and scrape the bottom and corners of the pan. If lumps form, strain the hot pastry cream through a fine-mesh sieve before chilling.
  • Don't overcook: Once the mixture thickens and bubbles, remove it from the heat immediately. Overcooking can make the cornstarch break down and the cream weep.
  • Use whole milk: For the richest texture, use whole milk. Low-fat or skim milk will produce a thinner cream.
  • Cool quickly: Spread the pastry cream in a shallow dish and press plastic wrap on the surface. This prevents a skin from forming and cools it faster for safe storage.

Serving Suggestions

Use pastry cream as a filling between cake layers, spread it under fresh fruit in a tart, or pipe it into cream puffs and éclairs. For a simple dessert, spoon it into glasses and top with whipped cream and berries. It also works as a filling for doughnuts or as a base for fruit tarts.

Variations

  • Chocolate pastry cream: Add 4 ounces (115 g) finely chopped dark chocolate to the hot pastry cream after removing it from the heat. Stir until melted and smooth.
  • Coffee pastry cream: Dissolve 1 tablespoon instant espresso powder in the hot milk before tempering the eggs.
  • Citrus pastry cream: Add 1 tablespoon finely grated lemon or orange zest to the milk while heating.
  • Lighter pastry cream: Fold 1/2 cup (120 ml) softly whipped cream into the chilled pastry cream just before using.

Storage and Reheating

Store pastry cream in an airtight container with plastic wrap pressed directly on the surface in the refrigerator for up to 3 days. Do not freeze; freezing causes the cornstarch to break down and the cream to become watery. Pastry cream is served cold or at room temperature; do not reheat it, as it will thin out and may curdle. If you need to loosen chilled pastry cream for spreading, whisk in a little cold milk rather than heating it.

Frequently Asked Questions

Can I make pastry cream ahead of time?

Yes, pastry cream can be made up to 3 days in advance. Keep it covered with plastic wrap pressed directly on the surface and refrigerated. Whisk until smooth before using.

Why did my pastry cream turn lumpy?

Lumps usually form if the egg mixture was added to the hot milk too quickly or if the heat was too high. Temper the eggs slowly by adding hot milk gradually while whisking, and cook over medium heat, whisking constantly. If lumps do form, strain the hot cream through a fine-mesh sieve.

Can I use cornstarch instead of flour?

Yes, this recipe uses cornstarch, which gives a glossy, smooth texture. If you substitute flour, use 1/4 cup (30 g) all-purpose flour and cook for an additional 1–2 minutes to remove the raw flour taste.

How do I prevent a skin from forming on pastry cream?

Press a piece of plastic wrap directly onto the surface of the hot pastry cream before refrigerating. This blocks air and prevents a skin from forming.

Can I freeze pastry cream?

Freezing is not recommended because the cornstarch breaks down and the cream becomes watery upon thawing. It is best made fresh and refrigerated for up to 3 days.

Is it safe to eat pastry cream that has been left out?

No. Pastry cream contains eggs and milk and is perishable. Discard any pastry cream that has been left at room temperature for more than 2 hours.

Read next