Pastry Cream Recipe

This pastry cream recipe tastes like sweet vanilla custard and is the perfect filling for cakes, pies and other pastries. 

This pastry cream recipe is a baking staple. It’s basically vanilla pudding (if you’re in the USA) or a custard. It’s made from milk, sugar, eggs, and cornstarch (or sometimes flour). Pastry cream is used as a filling in donuts, tarts, cream pies, and other pastries. 

I love using pastry cream as a filling for my cream tart recipe! Combined with stabilized whipped cream it makes a delicious diplomat cream. 

pastry cream recipe

Turns out I had been eating this creamy dessert in all kinds of things and I didn’t even know it. Now that I know how to make my own, I’ll never buy it again. 

The first time I made a pastry cream recipe in culinary school, I didn’t even know what I was making. I thought it was some super fancy filling that only French chefs knew about. When I tasted it, I was like oh duh, I know what this is! It’s donut filling haha! 

How to make a great pastry cream recipe

The key to a perfect pastry cream recipe is to temper the eggs. Which means heat them a little bit at a time so you don’t shock (aka cook) them. If you just dump all the hot milk into the eggs right away you’ll cook them and end up with egg lumps in your pastry cream. 

best pastry cream recipe

  1.  Combine first quantity of milk and sugar in a medium saucepan. Bring to a simmer while whisking constantly to prevent burning your milk. 
  2. In a heat safe bowl add the second quantity of sugar, egg yolks, and corn starch and whisk to combine.
  3. Now for the tempering. Add 1/4 of the hot milk into the egg mixture very slowly while whisking the whole time. DO NOT add all the milk otherwise it may curdle your eggs. 
  4. Slowly add remaining milk mixture to your eggs whisking constantly.
  5. Place mixture back into the saucepan and bring to a simmer. Reduce the heat while whisking constantly until it begins to thicken (about 2-3 minutes). 
  6. Remove your pastry cream from the heat and place into heat safe bowl. Add the chunks of butter on top and let them melt. This protects the cream from getting a film. Allow the pastry cream to cool until it’s just warm to the touch and then mix it all together.
  7. Place in an airtight storage container and put a piece of plastic wrap directly on to the surface of pastry cream to prevent a film from forming. Store for up to 3 days in the fridge but use as soon as possible. 

how to make the best pastry cream recipe

Why is my pastry cream runny?

This pastry cream is basically a custard recipe meaning it’s thickened by cooking the egg yolks and corn starch within the liquid. Egg yolks contain a protein called amylase that will actually break down and get water if it’s not cooked all the way. 

Remember when we talked about cooking the pastry cream 2-3 minutes after it starts bubbling? Yea… make sure you really do that. 

How do I store my pastry cream?

Because pastry cream has high moisture content and perishable ingredients, it should be stored in the refrigerator and used as quickly as possible. Pastry cream used in fresh fruit tarts or cakes has a shelf life of no more than 2 days. 

Pastry cream can be made ahead and refrigerated, wrapped well with plastic wrap on surface, up to 3 days.

You can also purchase a stable pastry cream that stays fresh in the refrigerator for 3-6 months from Henry & Henry. I like to mix this with fresh marion berries for a delicious filling for my cakes without worrying if the filling will go bad. 

Full disclosure, this shouldn’t be a shock to you but this does not taste remotely as good as a homemade pastry cream recipe. 

henry and henry bavarian cream filling

Sometimes your pastry cream might separate. This is a pretty common problem and it can be easily solved. When your pastry cream starts bubbling, make sure you cook it for 2-3 minutes to give time for all the cornstarch to cook.
Pastry cream separates when the liquid in the cream separates from the solids because it wasn’t cooked long enough. 
Two things can cause lumpy pastry cream. You could have potentially over-heated the pastry cream while cooking which causes lumps. You can get rid of these lumps by using an immersion blender. 
The other way you can get lumps in your pastry cream is by adding the cream too fast to your eggs and you get bits of cooked egg in the mix. You can get these lumps out by pushing your pastry cream through a strainer or by using an immersion blender. 

How to make a dairy-free pastry cream

You can make this pastry cream dairy free by substituting the milk for any other type of milk like almond or soy. You can also leave out the butter. 



Pastry Cream Recipe

pastry cream recipe
Pastry cream is a vanilla custard that is used in all types of desserts and cake fillings. Super versatile and can be made dairy free!
Servings: 5 cups


  • 32 oz milk may sub: almond, soy, coconut etc
  • 5 oz sugar
  • 1 Tbsp vanilla extract
  • 3 oz cornstarch
  • 4 oz sugar
  • 4 egg yolks
  • 1 large egg
  • 4 oz unsalted butter


Pastry Cream Recipe Instructions

  • Bring milk and first quantity of sugar to a simmer over medium high heat. Whisking constantly to avoid burning.
  • Combine the eggs, cornstarch, and second quantity of sugar in a heat proof bowl and whisk to combine
  • Add 1/4 of your hot milk mixture to the egg mixture VERY slowly while whisking constantly to temper your egg yolk mixture. Whisk until smooth.
  • Slowly add the rest of the milk, whisking constantly. Return mixture to the saucepan and bring to a simmer.
  • Once your mixture starts bubbling, reduce the heat to medium and continue whisking for 2-3 minutes to ensure the mixture is cooked and properly thickened.
  • Pour your mixture into a heatproof container and place your butter cubes on top, allowing them to melt. Do not cover.
  • Allow your pastry cream to cool until just warm to the touch. Stir in your butter and then add in your vanilla extra.
  • Cover with plastic wrap so that it's touching the surface of the pastry cream to avoid a skin forming. Can be kept in the refrigerator for 2-3 days.


Calories: 606kcal | Carbohydrates: 76g | Protein: 10g | Fat: 29g | Saturated Fat: 17g | Cholesterol: 265mg | Sodium: 106mg | Potassium: 271mg | Fiber: 1g | Sugar: 61g | Vitamin A: 1130IU | Calcium: 235mg | Iron: 0.7mg
Course: Dessert
Cuisine: French
Keyword: berry filling, coconut custard, pastry cream, pudding
Calories: 606kcal
Author: Elizabeth Marek

homemade pastry cream recipe




9 comments on “Pastry Cream Recipe

  1. Do you ever use pastry cream to fill a cake? Would it need to be thickened further or stabilized for that? My grandmother wants a champagne custard filled cake for her birthday and I haven’t had much success finding a recipe suitable for it. To flavor this pastry cream with champagne would you replace some of the milk with champagne or add a few tablespoons of a champagne reduction? Thanks for any tips. Your tutorials have been a lifesaver for me in the kitchen! I’m using your vanilla cake recipe and stabilized whipped cream for the other components of her (93rd!) birthday cake!

    1. Yes I have! I have a coconut cream cake recipe coming out soon that uses pastry cream as the filling. You definitely have to use a dam to keep the cream inside and don’t fill more than 1/4″ thick. I would flavor the pastry cream with champagne emulsion (the same I use for the champagne cake) to get the flavor. I don’t mess around with reductions.

  2. Have not made sugar cream yet but sounds delicious

  3. Hello, fixing to make this recipe soon.
    In the video I noticed you used gelatin however that’s not in the written recipe. Should I add gelatin? If so how much and at what point?
    As well, in written recipe above it calls for
    5 oz of sugar and 4 oz of sugar, please explain.

    Thanks a bunch!

    1. Hi there, I’m not sure which video you are referring to. This recipe doesn’t have gelatin in it.
      The recipe reads “bring milk and first quantity of sugar” meaning the first amount. The second quantity is used in the second step.

      1. I had multiple windows open with your recipes confused them sorry!!! Thx.

  4. Hi Liz! Thanks for sharing. I want to make lemon pastry cream so how would you suggest I change the recipe for that flavor? I assume adding zest? Should I forgo the vanilla extract then? And should I add some fresh lemon juice or will that affect the way it cooks up? I appreciate any suggestions you have.

Leave a Reply

Your email address will not be published. Required fields are marked *