Pastry cream is the filling that makes a cream puff so delicious. It’s the custard piped into éclairs, spread under the fruit on a tart, layered into Boston cream pie, and tucked inside warm bomboloni. It’s a French custard—crème pâtissière—and once you know how to make it, a whole world of bakery-case desserts is at your fingertips!
Here’s the truth about pastry cream: it’s easy! The recipe is short, the ingredients are things you likely already have, and the technique is simple, but it needs to be done right. The first time I made pastry cream years ago, I walked away from the pot for just a second to grab a bowl, and came back to scrambled eggs. I’ve probably made it a hundred times since, and the difference between silky and grainy custard comes down to about ninety seconds of attention at the stove. This post is built around getting you through those ninety seconds and how you can make sure your pastry cream is silky and smooth every time.
A reader, Erin, says: “Thank you, John! I’ve tried to make pastry cream countless times, and watching your video paired with your positivity helped me and my friend be successful…finally!” ★★★★★
Table of Contents

What Is Pastry Cream?
Pastry cream is a custard made from milk, sugar, and egg yolks, and thickened with cornstarch until it’s firm enough to hold its shape and pipe cleanly once cooled. That cornstarch is the key to the difference between pastry cream and a pourable custard. Without starch, you get a thick but pourable sauce; with it, you get the extra thick, scoopable, vanilla-scented pudding-like filling that oozes out of an éclair.
The flavor should be rich but restrained. I keep mine on the less-sweet side (⅔ cup of sugar to 2 cups of milk) because pastry cream is almost always paired with something sweeter—ganache, glaze, sugared fruit, sweet whipped cream—and a too-sweet custard tips the whole dessert over. Whole milk is non-negotiable for me here. I’ve tested this with 2% to see how it goes, and the result is gummier and noticeably less satisfying on the spoon; the fat in whole milk is doing real work on the texture.
Pastry Cream vs. the Other Custards
The custard family confuses people, and the names are French, which doesn’t help. Here’s the quick map, because knowing where pastry cream sits makes every variation below make sense.
| Custard Type | Texture/Ingredients | How It’s used |
| Crème anglaise | Thin and pourable. A pouring custard thickened with egg yolks alone, typically with no starch. | It’s the sauce you pour around a dessert plate or over a slice of cake. |
| Crème pâtissière (pastry cream) | Thick and pudding-like. Starch plus yolks, cooked long enough to firmly set the starch and egg proteins. | Once cooled, it’s thick enough to pipe. Used in eclairs. |
| Crème légère | Thick and airy. Pastry cream lightened with whipped cream. | Perfect for filling cream puffs or using in mille feuille. |
| Crème diplomat | Thick and airy, but very stable. It is essentially Crème légère stabilized with a little gelatin | Great for cake fillings or entremets (pastries that are sliced and need to hold their structure) |
| Crème mousseline | Thick and buttery. Pastry cream is beaten with soft butter until it’s light and spreadable. | The typical filling in a Paris-Brest. Can be piped or spread. |
Key Ingredients

These are the main ingredients you need to make a classic pastry cream. You can find the full list of ingredients and measurements in the recipe card below.
Whole milk — makes up the body of the custard. Whole milk gives a creamier result than low-fat, so I always use it. Low-fat milk can make the pastry cream feel gummy since there’s less fat for a rich, melt-in-your-mouth texture.
Vanilla — a split vanilla bean with the seeds scraped out gives the prettiest speckled result and a deep flavor. Vanilla bean paste or a good pure vanilla extract both work; use 2 teaspoons in place of a vanilla bean. Skip imitation vanilla essence—vanilla is the headlining flavor here, and you’ll taste the difference!
Egg yolks — yolks give richness and help thicken the custard. Separate them from the egg whites while the eggs are cold (yolks hold together better straight from the fridge), then cover and let them come to room temperature. Save the whites for Italian buttercream or Swiss meringue buttercream.
Granulated sugar — plain white sugar sweetens the custard without overpowering the vanilla. It also contributes to a silky texture, so don’t reduce the amount.
Cornstarch — this is the key thickener. It firms up the custard without the floury taste all-purpose flour can leave, and as a bonus, it keeps this recipe gluten-free (check your ingredient labels to be sure!). It also provides a safeguard for the yolks against scrambling by acting as little bumpers between the egg proteins, preventing them from coagulating as tightly.
Unsalted butter — a small amount whisked in at the very end adds shine, richness, and a smoother texture once cooled and set.
How To Make Pastry Cream
Below, I’ve highlighted portions of the recipe in step-by-step process images along with instructions for making crème pât. You can find the full set of instructions in the recipe card below.

1. Infuse the milk. Split the vanilla bean lengthwise, scrape the seeds, and add both the pod and seeds to the milk in a medium saucepan. Bring to a simmer over medium-high heat, then pull it off the heat and let it sit, covered, for 15 minutes. This steep is where the vanilla actually flavors the milk; rush it, and the flavor stays shallow. After steeping, fish out the split pod.
2. Prepare the egg yolks while the milk steeps. In a heat-proof bowl, combine the egg yolks and sugar. Make sure your bowl can handle hot liquid being poured into it—you will be tempering the eggs with the hot milk.

3. Whisk yolks and sugar until smooth and lighter in color, just about 30 seconds. This will lighten the yolks for more even tempering.
4. Add the cornstarch. Sift it in and whisk until it is completely smooth without lumps. Lumps here become gummy lumps in the finished cream, so take the extra thirty seconds.

5. Temper the eggs. Slowly pour about ½ cup of the hot milk into the yolk mixture while whisking constantly, then whisk in the rest. Tempering means warming the eggs up gradually so they don’t seize when they hit the heat. If you pour all of the hot milk in at once, any yolks the milk first touches cook instantly into scrambled threads. A thin stream with constant whisking brings the whole bowl up in temperature together.
6. Strain back into the pan. Pour the mixture through a fine-mesh strainer back into the saucepan. This catches any potential stray bits of cooked egg or vanilla pod before cooking. It’s an added step but insurance for a silky result, so it’s worth it!

7. Cook to thicken the custard. Cook over medium heat, whisking continuously, until it thickens and starts to bubble, 5 to 8 minutes. Once bubbling, keep cooking for about 1 minute. This is the make-or-break step, and there’s a piece of chemistry behind it most people don’t know: egg yolks contain an enzyme (alpha-amylase) that breaks starch back down and would re-thin your custard. To deactivate it, you need to get the mixture hot enough, bringing it just shy of boiling (around 200°F). So when you see those first thick “blubbing” bubbles break the surface, don’t pull it early. Let it bubble while whisking for a good minute. This is also what cooks out any raw starch taste. Whisk all around the pan the whole time (not just the center) so nothing sets and scorches on the bottom. A gentle, constant motion is the goal; don’t beat air into it.
8. Finish with butter. Off the heat, whisk in the cold butter until melted. It smooths the texture and adds shine. Cover and chill. Transfer the pastry cream to a bowl and press plastic wrap directly onto the surface so a skin can’t form. Refrigerate for at least 2 hours to cool and set. Before using, whisk it smooth again; chilled pastry cream sets very firm and needs to be loosened back into a silky state. It will still be stable and hold its shape once whisked or beaten if it was cooked properly.
The Three Main Things That Go Wrong
Pastry cream fails in three predictable ways. I’ve done all three over the years, so here’s what each one means and what I’ve learned about how to fix or prevent them.
It’s grainy or has tiny scrambled bits. The heat was too high, or you stopped whisking, and the yolks curdled. If it’s minor, whisking hard off the heat and then straining can save the pastry cream. If it’s very grainy throughout, the egg has cooked into a firm texture, and there’s no real fix. Start over with lower heat and don’t stop whisking. When this happened to me, I tried to strain it and ended up with semi-smooth but very eggy custard.
It’s too thin and won’t set. This almost always means it didn’t get hot enough, so the cornstarch never fully activated, the egg proteins didn’t set enough, or the enzyme wasn’t deactivated (remember, without deactivating the alpha-amylase, it’s actively working against you). You can try bringing it back to the stove, wicking constantly, and letting it bubble for a full minute, whisking. Your target temperature is 200°F.
It turned grayish. This happens if you cook it in an aluminum or other reactive pan—the metal discolors the custard. Use stainless steel, nonstick, or a heavy enameled pan, and it’ll stay creamy pale yellow.

Make It Your Own: Diplomat, Mousseline & Flavor Variations
This base custard is a launch pad for many different types of custard and added flavors. A few of my favorites:
Crème légère (lightened pastry cream). Whip 1 cup of heavy cream to stiff peaks. Whisk your chilled pastry cream until smooth, fold in about a quarter of the whipped cream to loosen it, then fold in the rest. This version is lighter, airier, and it stretches the batch. It’s great for cream puffs!
Crème diplomat (stable, for cakes and piping). Bloom 1 teaspoon of gelatin in 3 tablespoons of cold water, then microwave for 10-15 seconds to melt the gelatin. Whisk the melted gelatin into your loosened chilled pastry cream, then fold in 1 cup of cream whipped to stiff peaks. The gelatin keeps it from weeping, so it holds up well as a cake filling or piped decoration.
Crème mousseline. Beat 2 cups of softened butter into the chilled pastry cream until light and fluffy. This is a richer and more spreadable variation, and the classic Paris-Brest filling. It’s also similar to German buttercream!
Flavor swaps. Steep a strip of lemon or orange zest in the milk for a citrus note (don’t use the juice, or you can curdle the milk). Whisk in ½ cup (90g) of melted bittersweet chocolate at the butter stage for a chocolate pastry cream. Or add a spoonful of espresso powder for coffee. You can also stir in 2 tablespoons of your favorite liqueur along with the butter before chilling. This will soften the texture slightly, so don’t add more than that.

Pro Tips For Making The Best Pastry Cream
Whisk the pastry cream constantly while it’s on the stove. It requires your full attention to prevent lumps and scorched bits. Whisking constantly also helps the custard thicken evenly. Be sure to whisk all around the saucepan, not just in one spot, so the milk and eggs don’t stick to the pot and scorch or scramble. But don’t beat it! A gentle stir with the whisk is just fine. If you whisk vigorously, you will incorporate air and potentially prevent the creme pat from setting up properly.
Refrigerate before using. Crème pâtissière needs to be chilled for at least 2 hours to allow it to set and firm up.

Pastry Cream Recipe
Video
Equipment
- Saucepan
- Mixing Bowls
- Fine mesh seive
Ingredients
- 2 cups whole milk (480mL)
- 1 vanilla bean split lengthwise and seeds scraped
- 6 large egg yolks
- ⅔ cup granulated sugar (133g)
- ¼ cup cornstarch (40g)
- 1 tablespoon cold unsalted butter
Instructions
- In a medium saucepan, combine the milk and vanilla bean pod and seeds, then place over medium heat and bring to a simmer, about 8 minutes. Immediately remove from the heat and set aside to infuse the vanilla in the milk for 15 minutes. Remove the vanilla bean pod.
- In a heat-proof bowl, whisk the egg yolks and sugar until smooth and a bit lighter in color. Sift in the cornstarch and whisk vigorously until no lumps remain.
- While whisking, slowly pour in ½ cup of the hot milk mixture into the egg yolks. Then, slowly whisk in the remaining hot milk mixture. Once combined, pour the mixture through a fine mesh strainer back into the saucepan.
- Cook over medium heat, gently whisking continuously, until thickened and bubbling, 5 to 8 minutes. If you are using it for a filling or piping, make sure you cook it for about a minute once it is bubbling to strengthen the set. (The target temperature is 200°F.) Remove from the heat and whisk in the butter until melted.
- Transfer the pastry cream to a bowl and press plastic wrap directly onto the surface to prevent skin from forming.
- Chill for at least 2 hours or until ready to serve. The custard can be made up to 24 hours in advance. Whisk the pastry cream again until smooth before using, as it will have set into a firm custard.
Notes
- If you notice a few lumps in your custard after it is cooked, pass it through a sieve to remove them. This ensures a silky smooth texture once set.
Nutrition
How to Use It
Pastry cream is the classic filling in chocolate éclairs, cream puffs, profiteroles, and mille-feuille. It’s the middle layer of a Boston cream pie and the filling under the fruit in a fruit tart. I also love it piped into warm bomboloni and canelés (it’s not technically a traditional way to serve them, but it’s delicious!). As a cake filling, it works beautifully, but build a buttercream dam around the edge first so the pastry cream doesn’t squeeze out under the weight of the top layers.
Storage
Keep pastry cream in an airtight container in the fridge, plastic wrap pressed to the surface, for up to 3 days. It’s made of milk and eggs, so it’s perishable—don’t leave it or desserts made with it at room temperature for more than an hour or two. I don’t recommend freezing plain pastry cream; the starch and egg protein network breaks on thawing, and it turns weepy and grainy.

Frequently Asked Questions
Pastry cream is a custard—specifically a custard thickened with cornstarch so it’s thick and pipeable, almost like a firm pudding. A custard thickened with only eggs, thin enough to pour, is crème anglaise. So all pastry cream is custard, but not all custard is pastry cream.
Yes, make it up to 3 days ahead, covered and refrigerated with plastic wrap on the surface. Whisk or beat it smooth right before using, since it sets firm in the fridge.
It wasn’t cooked for long enough. The cornstarch needs to simmer for about a minute, both to thicken properly and to cook out that raw-starch flavor.
You can, but you’ll need roughly three times as much flour to get the same thickening power as cornstarch. It’s also more prone to a pasty taste, and it won’t be gluten-free. I prefer cornstarch for a cleaner flavor and a silkier set.
More Recipes To Try
Try one of these dessert recipes using custard:
- Crème Brûlée — the custard family’s baked cousin: silky, spoonable, and finished with a torched sugar crust.
- Tiramisu Cake — tender vanilla sponge cake layered with a pastry cream filling that is lightened with mascarpone but sturdy enough to slice.
- Flan — a sliceable baked custard soaked with caramel sauce.
- Cream Pie — a diner classic with a crisp, buttery pie crust and smooth vanilla pudding filling.
- Coconut Cream Pie — a crisp pie crust shell filled with a coconut custard, toasted coconut, and topped with whipped cream.
If you’ve tried this pastry cream recipe, then don’t forget to rate it and let me know how you got on in the comments below. I love hearing from you!




















Erin says
Thank you, John! I’ve tried to make pastry cream countless times, and watching your video paired with your positivity helped me and my friend be successful…finally!
Sarah Ward (Executive Editor, Preppy Kitchen) says
So happy to hear! John is so great at teaching, and I’m glad you were able to make a delicious pastry cream following his instruction.
Donna says
Amazing! So quick and easy to make and tastes amazing
Bernadine says
After you make the pastry cream. Could you put half of the pastry creme to whip cream to make diplomat creme?
Also, how to incorporate cocoa powder or liquor into the diplomat creme?
Sarah Ward (Executive Editor, Preppy Kitchen) says
Absolutely, John uses this pastry cream folded with whipped cream as the filling in his cream puffs! Whip your cream to stiff peaks, then fold it into the pastry cream in 2 to 3 batches. (Check out the cream puffs recipe for detailed instructions.) To add cocoa powder, add it to your whipped cream so it incorporates properly. For a liquor, you can whisk in a tablespoon or two into the hot pastry cream with the butter, or beat it into the whipped cream before folding it in.
Donna says
Perrrrrrrrrrfect… Just made it. I love it. Thank you.
John Kanell says
Thank you Donna!
Mashrura Masud Nubah says
The pastry cream was AMAZING! The best recipe ever!!! I couldn’t stop eating right out of the bowl. My family loves it too. I’ve used this recipe for cream puffs, eclairs, etc. Absolutely love your recipes 🙂