Creamy Coconut Cream Pie Bars with Toasted Coconut
Coconut cream pie bars give you all the silky, toasted-coconut flavor of the classic pie in a sliceable, shareable square. A buttery shortbread crust holds everything together, so there is no rolling pin and no worry about a pastry shell getting soggy.

The custard sets up firm enough to slice cleanly, but stays creamy on the spoon. It is the kind of dessert you can set on the counter and let people grab, which makes it perfect for cookouts or a weeknight treat.
What Makes These Bars So Good
The shortbread crust stays crisp even after a night in the fridge, which is the main reason this works better than a pastry crust for a bar. It is sturdy but tender, and the butteriness plays perfectly against the coconut.
The custard is rich without being heavy. Using full-fat coconut milk plus a little dairy milk gives it the deep coconut taste you want, while the cornstarch keeps the texture smooth and sliceable. A final crown of whipped cream and toasted coconut adds just enough fluff and crunch.
Ingredients

- 1 1/4 cups all-purpose flour: spooned and leveled, for the shortbread crust
- 1/4 cup granulated sugar: for the crust
- 1/4 tsp fine sea salt: for the crust
- 1/2 cup unsalted butter, cold and cubed: straight from the fridge
- 1/2 cup granulated sugar: for the custard
- 1/4 cup cornstarch: the thickener that gives clean slices
- 1/4 tsp fine sea salt: balances the sweetness
- 1 can (13.5 oz) full-fat coconut milk: shaken, the fat carries the coconut flavor
- 1/2 cup whole milk: lightens the texture
- 4 large egg yolks: tempering makes the custard rich and silky
- 1 tsp vanilla extract
- 1/2 tsp coconut extract, optional: boosts the coconut without tasting artificial
- 1/4 cup unsweetened shredded coconut: stirred into the custard for texture
- 1 cup cold heavy cream: for the topping
- 2 tbsp powdered sugar: sweetens the whipped cream gently
- 1/2 tsp vanilla extract: for the whipped cream
- 1/4 cup toasted unsweetened coconut flakes: for garnish and crunch
Variations / Substitutions
- Dairy-free: use the full coconut milk plus an equal amount of coconut cream beverage instead of whole milk, and swap the heavy cream for chilled full-fat coconut cream whipped with powdered sugar.
- Sweetened shredded coconut: reduce the sugar in the custard to 1/3 cup if using the sweetened kind, and watch the garnish closely when toasting because it browns faster.
- Almond twist: replace the coconut extract with 1/4 tsp almond extract for a different but complementary note.
- Gluten-free crust: use a 1-to-1 gluten-free flour blend in place of the all-purpose flour.
If you like coconut and chocolate together, try our Coconut Chocolate Chunk Cookie Bars for another easy dessert.
How To Make Coconut Cream Pie Bars
Step 1: Bake the Shortbread Crust

Preheat the oven to 350°F (175°C) and line an 8-inch square baking pan with parchment paper. Mix the 1 1/4 cups flour, 1/4 cup sugar, and 1/4 tsp salt in a bowl. Drop in the cold cubed butter and work it in with your fingertips or a pastry blender until the mixture looks like coarse sand and holds together when squeezed.
Press the mixture evenly into the bottom of the pan, using the bottom of a flat glass to compact it. Bake for 12 to 15 minutes, until the edges turn golden and the surface looks dry. Let the crust cool on a rack while you make the custard, leaving the oven off.
Step 2: Cook the Coconut Custard

In a medium saucepan, whisk together the 1/2 cup sugar, 1/4 cup cornstarch, and 1/4 tsp salt. Pour in the coconut milk and whole milk, then add the 4 egg yolks and whisk until completely smooth. Set the pan over medium heat and cook, whisking constantly, until the mixture thickens and big bubbles break the surface, about 5 to 7 minutes.
The custard will go from thin to thick quite suddenly near the end, so do not step away from the stove. Once it is pudding-thick and coats the back of a spoon, pull the pan off the heat and immediately stir in the 1 tsp vanilla, 1/2 tsp coconut extract if using, and the 1/4 cup shredded coconut.
Step 3: Spread the Custard Filling

Pour the warm custard over the cooled crust and spread it into an even layer with an offset spatula. Press a sheet of plastic wrap directly onto the surface of the custard so it does not form a skin.
Transfer the pan to the refrigerator and chill for at least 2 hours, or until the custard is completely firm and cold. The filling will feel set to the touch and should not jiggle when you gently shake the pan.
Step 4: Top and Serve

With an electric mixer, beat the 1 cup cold heavy cream with the 2 tbsp powdered sugar and 1/2 tsp vanilla until soft peaks form. Lift the plastic wrap from the chilled bars and pile the whipped cream on top, spreading it all the way to the edges. Scatter the toasted coconut flakes over the cream.
Run a knife around the sides of the pan, then use the parchment to lift the whole block onto a cutting board. Slice into 9 squares and serve right away while the bars are still cool and the cream is fluffy.
Tips for the Best Coconut Cream Pie Bars
- Whisk the custard the whole time it is on the heat so the cornstarch distributes evenly and you avoid lumps.
- Toast the coconut flakes in a dry skillet over medium-low heat, shaking the pan often, for about 3 minutes. They go from pale to burnt fast, so pull them the moment they turn golden.
- Use full-fat coconut milk because light coconut milk produces a looser custard that may not slice cleanly.
- If your custard ever gets lumpy, strain it through a fine-mesh sieve before pouring it over the crust, it will still taste great.
Crust bake times by pan size:
| Pan Size | Crust Bake Time |
|---|---|
| 8×8-inch square | 12 to 15 minutes |
| 9×9-inch square | 10 to 12 minutes |
| 9×13-inch (double recipe) | 15 to 18 minutes |
Storing Leftover Bars
Refrigerate any leftovers in an airtight container for up to 3 days. The crust stays crisp and the custard remains sliceable. Serve the bars straight from the fridge, cold and firm.
Frequently Asked Questions
Can I freeze coconut cream pie bars?
It is not recommended. The custard can separate and weep when thawed, leaving the bars watery.
What if I do not have cornstarch?
You can swap in an equal amount of arrowroot powder. The custard will set similarly, though it may soften a little faster at room temperature.
Can I use a store-bought shortbread crust to save time?
Yes, a pre-made shortbread crust pressed into the pan and baked according to its package directions works. Skip the crust baking step and pour the custard over it once cooled.
How do I get the neatest slices?
Chill the bars completely, then use a long, sharp knife wiped clean between cuts. A slightly warm blade glides through the custard without dragging.
Can I make these dairy-free?
Absolutely. Use the coconut milk plus a dairy-free milk alternative for the custard, and whip chilled full-fat coconut cream in place of the heavy cream. The flavor will be even more coconut-forward.

Coconut Cream Pie Bars Recipe
Ingredients
Method
- Preheat oven to 350°F. Mix flour, 1/4 cup sugar, and 1/4 tsp salt. Cut in butter until crumbly, press into an 8-inch square pan, and bake 12-15 minutes until golden.
- Whisk 1/2 cup sugar, cornstarch, and 1/4 tsp salt in a saucepan. Add coconut milk, whole milk, and egg yolks; cook over medium heat, whisking constantly, until thick and bubbling, about 5-7 minutes. Remove from heat and stir in vanilla, coconut extract, and shredded coconut.
- Pour custard over cooled crust and spread evenly. Press plastic wrap onto the surface and chill at least 2 hours until firm.
- Whip heavy cream, powdered sugar, and 1/2 tsp vanilla to soft peaks. Spread over chilled custard, top with toasted coconut, and slice into squares.
