These Gooey Coconut Pie Bars are my go-to when I want something that feels indulgent but comes together without fuss. The base is a buttery shortbread that bakes into a stable, slightly crisp platform for a sweet, custardy coconut topping. The contrast between the tender crust and the gooey center is what makes these bars irresistible.
I love how forgiving this recipe is: a handful of pantry staples, one bowl for the filling, and a single pan. They cut into perfect squares after cooling, which makes them great for potlucks or an afternoon sweet to enjoy with coffee. They store well for a few days and even freeze nicely if you want to save some for later.
Ingredients at a Glance

- 1 cup unsalted butter, softened — provides the rich, tender shortbread base; room temperature makes it easy to work into a smooth dough.
- 2 cups all-purpose flour — structure for the crust; measure by spooning into the cup for accuracy.
- 1/2 cup powdered sugar — gives a fine-textured sweetness to the shortbread and helps it stay tender.
- 1/2 teaspoon salt — balances sweetness and enhances the butter flavor.
- 1 can (14 ounces) sweetened condensed milk — the sweet, creamy backbone of the gooey coconut filling.
- 1 large egg — helps set the filling and adds richness.
- 1 teaspoon coconut extract — intensifies the coconut flavor; use sparingly for best results.
- 2 cups shredded sweetened coconut — the texture and flavor star of the filling; shredded coconut gives chew and body to the bars.
Cooking (Gooey Coconut Pie Bars): The Process
- Preheat oven to 350°F. Line a 9×13-inch pan with foil (leave an overhang for easy lifting) and spray the foil with cooking spray.
- In the bowl of a stand mixer fitted with the paddle attachment (or in a bowl with a hand mixer), combine 1 cup softened unsalted butter, 2 cups all-purpose flour, 1/2 cup powdered sugar, and 1/2 teaspoon salt. Mix until a smooth shortbread dough forms, stopping to scrape the bowl as needed.
- Transfer the dough to the prepared pan. Spray your hands with cooking spray and press the dough into an even, thin layer across the bottom and slightly up the sides of the pan.
- Bake the crust in the preheated oven for 15 minutes, until it is set and the edges begin to firm.
- While the crust is baking, whisk together 1 can (14 ounces) sweetened condensed milk, 1 large egg, and 1 teaspoon coconut extract in a medium bowl until smooth. Stir in 2 cups shredded sweetened coconut until evenly combined.
- After the crust has baked 15 minutes, remove the pan from the oven and carefully pour the coconut mixture evenly over the hot crust. Spread gently if needed to distribute the filling.
- Return the pan to the oven and bake an additional 17–19 minutes, until the filling is set and the edges are golden brown (the center may be slightly soft but should not be liquid).
- Remove the pan from the oven and cool completely on a wire rack. Use the foil overhang to lift the bars from the pan, then cut into squares once fully cooled.
- Store the bars in an airtight container for up to 3 days, or freeze for up to one month.
Why You’ll Love This Recipe
These bars hit the sweet spot between easy and impressive. The shortbread crust is buttery without being flaky, which makes it sturdy enough to hold the gooey coconut filling. The filling itself is dense, creamy, and packed with coconut flavor thanks to the combination of sweetened condensed milk and coconut extract. You get a little crunch on the edges and a tender, slightly chewy bite in the center.
They’re also very adaptable. You don’t need tempering skills or precise timing beyond basic baking windows, so it’s approachable even for busy cooks or bakers who don’t bake often. The recipe scales well for a crowd and travels without losing its texture. If you want to prep ahead, the fact that these freeze well is a real win.
Ingredient Flex Options

There’s room to tweak without changing the spirit of the bars, but I recommend only small swaps so you don’t upset the balance between crust and filling.
- Butter — unsalted butter is called for to control salt level; if you only have salted butter, omit the added 1/2 teaspoon salt or reduce it slightly.
- Flour — all-purpose is best for structure. Using a lighter flour like cake flour can make the crust crumbly; I don’t recommend it here.
- Powdered sugar — it keeps the crust tender; swapping for granulated sugar will change texture and spread.
- Sweetened condensed milk — this is the foundation of the filling’s consistency. Using evaporated milk or regular milk won’t give you the same thickness or sweetness.
- Coconut — the recipe uses sweetened shredded coconut. If you prefer unsweetened, reduce the sweetened condensed milk slightly or be prepared for a less sweet bar.
What’s in the Gear List

- 9×13-inch baking pan — gives the bars their classic thickness and yields neat squares.
- Aluminum foil — used to line the pan and create an overhang for easy lifting.
- Cooking spray — prevents sticking and makes it easy to press and lift the bars.
- Stand mixer with paddle attachment or hand mixer — speeds up making a smooth shortbread dough; a strong wooden spoon and elbow grease will also work if needed.
- Medium mixing bowl and whisk — for combining the sweetened condensed milk, egg, and coconut extract.
- Wire rack — for cooling the pan so the bars set properly before slicing.
What Not to Do
Do not skip lining the pan with foil and leaving an overhang. That step makes removing the bars painless and keeps the pan intact. Also, don’t underbake the crust; if it isn’t set before you add the filling, the bars will be overly soft and hard to slice cleanly.
Don’t confuse “slightly soft in the center” with “runny.” The center should give a little when nudged, but it shouldn’t be liquid. If you pull the pan out too early the filling will slump as it cools. Likewise, don’t overbake; the filling will continue to firm up as it cools, so once the edges are golden and the center is not liquid, it’s time to pull them.
Warm & Cool Weather Spins
Warm weather: Keep a cooler or insulated bag handy if you’re transporting these to a picnic. Because the filling is buttery and rich, heat can soften the bars noticeably. If serving outdoors, consider cutting smaller squares and keeping them chilled until just before serving.
Cool weather: These bars are perfect slightly warmed. Pop an individual square in a low oven or microwave for 8–10 seconds to revive that gooey center and boost aroma. The coconut scent comes alive when warm, and the contrast with a cold glass of milk or a scoop of vanilla ice cream is lovely.
Author’s Commentary
I started making a version of these bars years ago when I wanted to capture the nostalgia of old-fashioned coconut pies but with easier handling and simpler serving. The shortbread base came from a pastry cook’s trick to keep the bottom from getting soggy, and the sweetened condensed milk filling is a classic for delivering that slightly caramelized, creamy chew without complicated tempering.
I like to press the crust a bit up the sides so each bar has a little rim that holds the filling. For a clean cut, I chill the pan until the filling firms up, then use a sharp knife warmed briefly under hot water between cuts. That keeps the edges neat and the coconut from pulling away in strands.
Save It for Later
To store: place cooled bars in an airtight container with parchment between layers and keep at room temperature for up to 3 days. If your kitchen is warm, store them in the fridge to prevent the filling from becoming too soft.
To freeze: cut the cooled bars into squares and layer them between sheets of parchment in an airtight, freezer-safe container or heavy-duty freezer bag. They’ll keep up to one month. Thaw in the refrigerator overnight, then bring to room temperature before serving. A quick zap in the microwave (8–10 seconds) refreshes texture if desired.
Helpful Q&A
Q: Can I make these gluten-free?
A: The recipe relies on all-purpose flour for the shortbread structure. You can experiment with a 1:1 gluten-free flour blend, but results will vary. A blend with xanthan gum is more likely to hold together.
Q: My filling browned too much on top. What happened?
A: Oven temperatures vary. If the edges or top brown before the center is set, tent the pan loosely with foil for the remaining bake time to prevent over-browning while the middle finishes setting.
Q: The bars are too soft after cooling. Why?
A: Either the crust wasn’t baked long enough before adding the filling, or the filling needed a couple more minutes in the oven. Make sure the crust is set and the filling is mostly set at the edges before removing the pan. The center should not be runny.
Q: Can I add mix-ins like chocolate or nuts?
A: You can fold a small handful of toasted chopped nuts into the coconut mixture or sprinkle mini chocolate chips on top after pouring the filling. Keep in mind that additions will change the texture and sweetness balance.
Before You Go
If you make these Gooey Coconut Pie Bars, I’d love to hear how they turned out and what small variations you tried. They’re one of those recipes that reward small tweaks—a dash more coconut extract for punch, a few toasted flakes for crunch, or serving warm with ice cream. Whatever you choose, the combination of buttery shortbread and creamy coconut filling is reliably comforting and surprisingly simple.
Bookmark this page, jot the recipe in your go-to notebook, and make a pan when you need a straightforward sweet that feels special. Happy baking—and don’t forget to leave a little room for the gooey center.

Gooey Coconut Pie Bars
Equipment
- 9x13 inch Pan
- Aluminum Foil
- Cooking spray
- stand mixer (paddle attachment) or hand mixer
- Wire Rack
Ingredients
Ingredients
- 1 cupunsalted buttersoftened
- 2 cupsall purpose flour
- 1/2 cuppowdered sugar
- 1/2 teaspoonsalt
- 1 can14 ounces sweetened condensed milk
- 1 large egg
- 1 teaspooncoconut extract
- 2 cupsshredded sweetened coconut
Instructions
Instructions
- Preheat oven to 350°F. Line a 9x13-inch pan with foil (leave an overhang for easy lifting) and spray the foil with cooking spray.
- In the bowl of a stand mixer fitted with the paddle attachment (or in a bowl with a hand mixer), combine 1 cup softened unsalted butter, 2 cups all-purpose flour, 1/2 cup powdered sugar, and 1/2 teaspoon salt. Mix until a smooth shortbread dough forms, stopping to scrape the bowl as needed.
- Transfer the dough to the prepared pan. Spray your hands with cooking spray and press the dough into an even, thin layer across the bottom and slightly up the sides of the pan.
- Bake the crust in the preheated oven for 15 minutes, until it is set and the edges begin to firm.
- While the crust is baking, whisk together 1 can (14 ounces) sweetened condensed milk, 1 large egg, and 1 teaspoon coconut extract in a medium bowl until smooth. Stir in 2 cups shredded sweetened coconut until evenly combined.
- After the crust has baked 15 minutes, remove the pan from the oven and carefully pour the coconut mixture evenly over the hot crust. Spread gently if needed to distribute the filling.
- Return the pan to the oven and bake an additional 17–19 minutes, until the filling is set and the edges are golden brown (the center may be slightly soft but should not be liquid).
- Remove the pan from the oven and cool completely on a wire rack. Use the foil overhang to lift the bars from the pan, then cut into squares once fully cooled.
- Store the bars in an airtight container for up to 3 days, or freeze for up to one month.
