This easy, silky chocolate pastry cream recipe will instantly elevate your favorite dessert. Made 100% from scratch with real ingredients, it has a deep chocolate flavor and a texture that’s perfect for layering, filling, or simply enjoying on its own. Whether you’re adding it to a classic recipe or creating something brand new, it adds an extra level of indulgence without feeling overly heavy or sweet.

What you can expect from this Chocolate Pastry Cream recipe
This easy chocolate crème pâtissière (a/k/a chocolate pastry cream) uses the same technique as my classic vanilla pastry cream, with a few key adjustments that make a noticeable difference in both flavor and texture.
Instead of relying on either cocoa powder or chocolate alone, this recipe for chocolate pastry cream uses both. The cocoa powder replaces some of the starch, helping thicken it while adding a deep, bittersweet chocolate base. Then, at the end, we pour hot pastry cream over high-quality semi-sweet chocolate to enhance the flavor and smooth the texture.
Because of the added cocoa butter from the chocolate, this cream sets slightly firmer than vanilla pastry cream, yet remains creamy and pipeable. It is stable enough to use as a filling without gelatin.
Even if you have never made vanilla pastry cream before, this recipe is a great place to start. Once you understand it, you can adapt it to many other desserts!

Katalin's key take on why make this cream from scratch instead of instant pudding
While it might be tempting to use instant chocolate pudding in recipes that call for chocolate custard, making chocolate pastry cream from scratch takes things to a completely different level.
First, when you make your own cream, you control every ingredient. There’s no need to worry about artificial flavors or stabilizers, and you can fine-tune the sweetness, chocolate intensity, and texture to your preferences.
Second, the flavor is far superior. Both the whole milk and the egg yolks add richness. The combination of cocoa powder and real chocolate creates depth that you simply won’t get from a boxed mix. With this recipe, you get a rich, balanced chocolate flavor that's not overly sweet.
Third, it is incredibly versatile. You can use it as-is, thicken or soften the texture, use different chocolates, infuse it with flavors, or use it as a base for other desserts.
Finally, making it from scratch is surprisingly simple. Once you understand the method, it comes together quickly and reliably, making it a foundational recipe worth mastering.
How to make chocolate pastry cream
Start by whisking the room-temperature egg yolks and sugar for 1–2 minutes to dissolve the sugar. Whisk until smooth, slightly pale, and fluffy.
Next, sift in the cornstarch and cocoa powder, add the vanilla extract and salt, and whisk until smooth and lump-free.

In a separate saucepan, heat the milk over medium heat just until it begins to simmer. It should be hot but not boiling.
Slowly pour the warm milk over the egg mixture while whisking constantly to temper the eggs. This process gradually raises the eggs' temperature, preventing them from scrambling.

Return the mixture to the saucepan and cook over medium heat, whisking continuously and scraping the bottom and corners of the pan with a rubber spatula. The custard will begin to thicken. If lumpy, keep whisking until smooth and glossy.
Once the mixture reaches a boil, continue cooking for at least one minute. This step is essential to fully activate the starch and eliminate any starchy taste. Keep the heat on low to medium to avoid burning the cream.

While the cream is still hot, add the semi-sweet chocolate. Let it sit briefly to melt the chocolate, then mix until smooth and fully combined.
Then, incorporate the softened butter (not melted) in stages, mixing well after each addition to fully incorporate it into the custard.
To cool, transfer the pastry cream into a large, shallow, airtight container and press plastic wrap directly onto the surface to prevent a skin from forming.

How to use chocolate pastry cream
You can use this decadent chocolate creme immediately, or easily store it in the refrigerator for later.
Use it anywhere you would typically use vanilla pastry cream. It works beautifully for a chocolate banana cream pie, layered between sponge cakes, or piped into tart shells. Chocolate pastry cream is also ideal to fill eclairs, cream puffs, or profiteroles.
To turn it into a chocolate version of my diplomat cream, fold in whipped cream to create a lighter, mousse-like filling.

How to store
To store, refrigerate the covered pastry cream at or below 4°C (40°F) for up to 2–3 days.
Once chilled, it will firm up slightly due to the butter and chocolate. Give it a few gentle whisks to restore its smooth, pipeable consistency.
I do not recommend freezing pastry cream. Freezing and thawing can alter the texture, leading to separation or a grainy texture.
Flavor variation ideas
Chocolate pastry cream is super versatile, with a wide range of flavor options, making it an excellent choice for fillings.
Instead of semi-sweet chocolate, you can use milk chocolate for a sweeter flavor or dark chocolate for a deeper, less sweet flavor. You can also make white chocolate pastry cream by omitting the cocoa powder and replacing it with an equal amount of corn starch or flour. Keep in mind that darker chocolate may require slightly more sugar, while white chocolate will yield a sweeter, softer pastry cream because it lacks cocoa solids.
For a mocha version, add a small amount of instant coffee or espresso powder to the milk.
For a citrusy twist, a bit of orange zest pairs especially well with chocolate. You can also add spices such as cinnamon for a warmer flavor profile.
For a subtle flavor boost, stir in 1–2 tablespoons of dark rum, Baileys, or coffee liqueur (like Kahlúa) into the chocolate pastry cream after it has cooled slightly, so the alcohol enhances the richness without overpowering the chocolate.

Ingredient substitute options
Pastry cream relies on specific ingredients for its structure, which can make ingredient substitutions challenging without adjusting the ratios of the other ingredients.
However, because this is a custard-based recipe, eggs and dairy are critical to achieving the desired consistency. While you can certainly experiment with dairy-free milk and butter or egg substitutes, doing so will significantly affect the texture and flavor.
I’ve made this several times with nut milk instead of whole milk, and it works well, but because plant-based milks contain more water and less natural richness, I usually double the thickener (cornstarch) to keep the pastry cream stable, smooth, and properly set.
My expert tips
- For the best chocolate pastry cream flavor and consistency, use 3% whole milk and 82% fat butter.
- Many recipes use whole eggs, but using only egg yolks yields a noticeably silkier, richer pastry cream with a cleaner flavor and a more luxurious texture. This leaves you with leftover egg whites, which are perfect for making pavlova—so nothing goes to waste, and you get two desserts from one batch.
- Do not skip the salt! It balances the chocolate flavor like nothing else.
- Use high-quality semi-sweet chocolate and 100% cacao Dutch-processed cocoa powder for the best flavor. I use Callebaut 811 Dark Chocolate Callets with 54.5% cocoa content in my recipes.
- Do not rush the cooking process. Keep the heat at low-medium and whisk constantly to prevent lumps and ensure even, complete thickening.
- For an extra smooth, lump-free texture, you can pass your chocolate cream through a fine-mesh sieve into a clean bowl.
- Note on the gelatin: After cooking, the cream will be soft and pourable, but once it chills in the fridge, it naturally sets to a pipeable consistency. If you prefer a lighter texture, simply give it a gentle whisk by hand a few times after it has set to loosen it up. Gelatin is not necessary; the cornstarch provides sufficient stability on its own.
- Avoid overwhisking once the pastry cream has cooled. A few gentle strokes are enough to restore its smooth texture without compromising its structure.

Helpful equipment
For the best results, use a digital scale for precise measurements.
You will need a hand whisk to whisk the ingredients together and a rubber spatula to gently fold in the butter.
You will also need a medium saucepan with good heat distribution.
Try some of my other cream fillings and frostings
If you loved this simple chocolate pastry cream recipe, check out these other creamy frosting and fillings:
- Bavarian Cream (Crème Bavarois)
- American Buttercream Frosting
- Strawberry Compote
- Homemade Caramel Filling
- Chocolate Ganache
- Lemon Curd
I also recommend my roundup of frosting for cakes and cupcakes for even more tasty additions to your favorite desserts.
Have you tried this recipe?
Please leave a 5-star ⭐️⭐️⭐️⭐️⭐️ rating on the recipe card and consider leaving a comment as well!

Chocolate Pastry Cream
Ingredients
- 480 g (2 cups) Whole milk 3% fat
- 100 g (½ cups) Granulated sugar
- 80 g (⅓ cups) Egg yolk approx. yolk of 4-5 eggs at room temperature
- 25 g (3 tablespoons) Corn starch
- 25 g (3 tablespoons) Cocoa powder unsweetened, dutch processed
- 1 teaspoon Vanilla extract
- ¼ teaspoon Salt
- 55 g (¼ cups) Unsalted butter 82% fat, room temperature soft butter
- 125 g (¾ cup) Semi-sweet chocolate high quality chocolate chips or chocolate bar cut into smaller chunks
US customary cup measurement is an indicative figure only. Measure the ingredients with a digital scale by weight (gram). Baking is art but also science which requires precision and accuracy.
Instructions
- In a large enough bowl, whisk together sugar and egg yolk until slightly fluffy for about 1-2 minutes.
- Whisk in the cornstarch, cocoa powder, vanilla, and salt until smooth and completely lump-free.
- Heat milk in a saucepan on medium heat, then remove it as soon as it starts simmering. Make sure it is just simmering and not boiling.
- Pour the warm milk over the egg yolk mixture, whisking vigorously as you pour. This step gradually raises the eggs' temperature, preventing scrambling.
- Pour the mixture back into the saucepan and cook over medium heat for a few minutes, whisking constantly and scraping the bottom and corners of the pan to prevent sticking. Concretely, it is approximately 1 min after the first boil. It might get lumpy first, don't worry, just keep whisking, and the cream will get smooth and glossy.
- For an ultra-smooth texture, pass the pastry cream through a fine-mesh sieve into a clean bowl to remove any lumps or bits of cooked egg.
- Add the chocolate to the very hot cream. Let it sit for a minute or two for the chocolate to melt, then mix with a rubber spatula until well incorporated.
- Lastly, add the softened butter, and mix until completely incorporated. It is worth adding the butter in 3 stages, mixing well after each addition.
- To cool it, place the cream in a shallow bowl or container and cover the entire surface with plastic wrap to prevent a skin from forming on top.
- Once cooled, you may need to whisk the chocolate pastry cream to get a smooth texture. Do not overmix it, as it can get runny. Give it a few whisks until smooth. Use it to fill tarts, eclairs, pies, and cakes.
- How to store:Pastry cream should be stored by cooling it quickly, then transferring it to a bowl and pressing plastic wrap directly onto the surface to prevent a skin from forming before refrigerating at or below 4°C (40°F); it will keep well for up to 2–3 days, and should be whisked smooth before use. How to freeze:Freezing is generally not recommended because the starch and egg structure tend to break down, resulting in a grainy, separated texture once thawed.
Notes
- Measure your ingredients with a digital scale for accuracy.
- Unsweetened, Dutch-processed cocoa powder, high-quality semi-sweet chocolate are the heart of making this pastry cream. Use also full-fat milk, high-quality European butter with 82% fat content, and the best-quality vanilla you can access.
- Make sure the butter is at room temperature before you begin. This normally takes around an hour out of the fridge.
- Always whisk the egg yolks and sugar until pale and smooth before adding starch—this ensures a silky texture.
- Use a small/medium-sized saucepan with good heat distribution to avoid burning the milk when making chocolate pastry cream.
- Let the cream boil gently for a minimum of 1 minute after the first bubble to fully activate the starch for stability.
- Let the cream set in the fridge before using. It will further set as it cools into a silky, pipeable consistency.

Leave a Reply