Coconut Pecan Magic Bars are those gooey layered bar cookies with a graham cracker crust and a sticky-sweet topping that sets up into the most satisfying bite. They’re rich, a little chewy, and full of that classic sweetened condensed milk flavor I always want in a hello dolly bar.
My take keeps it simple and classic: semi-sweet chocolate, lots of shredded coconut, and pecans for crunch. I like a thicker crust and a topping that actually holds together when you slice it, so these don’t turn into a crumbly mess.
These are especially good on a holiday cookie tray, but I make them year-round when I need an easy 9×13 dessert that feeds a bunch of people. They’re great chilled, and I think they taste even better the next day.

Why You’ll Love This Recipe
Fast and easy: It’s a quick mix-and-layer situation, and the oven does the rest. No mixer, no fancy steps.
That gooey middle: Sweetened condensed milk bakes into a soft, chewy layer that holds all the toppings together.
Great for cookie trays: Magic cookie bars slice neatly and stack well, which makes them ideal for parties and holidays.
Customizable: Swap the nuts, change the chips, or adjust the coconut to match what you like and what you have.
Make-ahead friendly: These bars set up really nicely after a chill, so they’re easy to bake earlier and slice later.
Reliable 9×13 dessert: This is one of those recipes that’s hard to mess up, and it consistently comes out rich and satisfying.
Ingredients You’ll Need
Crust
- Graham cracker crumbs: I use the boxed crumbs a lot, but pulsing whole crackers works too. Digestive biscuit crumbs are a great swap if that’s what you have.
- Unsalted butter: Melted butter is what makes the crust press in easily and hold together. If you only have salted butter, I’d still cut back the added salt a bit.
- Granulated sugar: Just enough to sweeten the crust and help it set. Brown sugar works too if you want a slightly deeper flavor.
- Fine salt: Don’t skip it. It keeps the crust from tasting flat next to the sweet topping.
Topping
- Sweetened condensed milk: This is the “magic” in magic bars and it’s not really optional. It bakes into that sticky layer that makes the bars sliceable and chewy.
- Sweetened shredded coconut: The sweetened kind gives the classic hello dolly bar taste and texture. If you want less sweetness, unsweetened coconut works—just add a little brown sugar like in the notes.
- Semi-sweet chocolate chips: Semi-sweet is my go-to here so the bars don’t taste overly sugary. Milk chocolate chips are fine if that’s what you like.
- Chopped pecans: Pecans are my favorite for these because they toast up so nicely. I like chopping them fairly small so you get crunch in every bite.
- Butterscotch chips: Optional, but they add that classic “seven layer bars” flavor. If you’re not a butterscotch person, just leave them out.
- Flaky sea salt: Also optional, but I love a little pinch on top. It makes the chocolate and coconut taste more balanced.

Recipe Instructions
- Preheat the oven: Heat the oven to 350°F.
- Prepare the pan: Line a 9×13-inch baking pan with parchment paper, leaving some overhang on the long sides, then lightly grease it.
- Mix the crust: Stir the graham cracker crumbs, melted butter, sugar, and salt together until the crumbs are evenly moistened.
- Bake the crust: Press the crust mixture firmly into an even layer, then bake for about 8 minutes, just until it looks set.
- Add the condensed milk: Pour the sweetened condensed milk evenly over the warm crust. Use a spatula if needed to gently nudge it toward the corners.
- Add the chips: Sprinkle the chocolate chips over the condensed milk, then add the butterscotch chips if you’re using them.
- Add coconut and pecans: Sprinkle the coconut over the chips, then add the chopped pecans. Press down lightly so the topping adheres.
- Bake: Bake for about 20 minutes, until the edges are golden and the center looks set.
- Cool and chill: Cool completely in the pan, then chill for 60 minutes so the bars cut cleanly.
- Slice: Lift the slab out using the parchment overhang, then cut into bars.

Some of my tips!
This is the part that really makes a difference. If you only read one section, make it this one because this is where I share the little trick that helps the recipe turn out so well.
Recipe Tips & Tricks
Use parchment paper. A little condensed milk can bubble up around the edges, and parchment keeps everything easy to lift and slice. The overhang is worth it.
Press the crust firmly. I really pack it down so it doesn’t crumble when you cut the bars. The bottom layer should look tight and even.
Toast the pecans if you have time. Even a quick toast brings out a deeper, nuttier flavor. Let them cool, then chop so they don’t get oily.
Don’t overbake. If you wait for the center to look totally firm in the oven, it can end up drier than you want. I pull them when the edges are golden and the middle is set but still a little soft.
Chill before slicing. This is the difference between clean bars and messy bars. If your kitchen is warm, give them a bit longer in the fridge.
Make some touches!
There are plenty of easy ways to serve this depending on the occasion. Keep it simple, or add a few small touches to make it feel a little more special.
Serving Suggestions
- Coffee or espresso: These bars are rich, so a simple cup of coffee is nice with them. I like them best with a darker roast.
- Milk: A cold glass of milk is classic with sweetened condensed milk bars. It’s also nice if you finish the bars with a little flaky salt.
- Ice cream: Serve a bar with vanilla ice cream on the side if you want a more “dessert-dessert” plate. A drizzle of chocolate sauce is good too, but not necessary.
- Fruit: Fresh berries are a good contrast to all the chocolate and coconut. Strawberries or raspberries are my usual pick.
Save it for later
This section covers how to store leftovers and what parts of the recipe you can prepare ahead of time.
Storage and Make Ahead
Store them airtight at room temperature for up to 3 days. If your kitchen runs warm, I usually move them to the fridge sooner so they stay firm.
Refrigerate for up to 7 days. I actually like these chilled, and they slice and stack well straight from the fridge.
You can make these bars a day ahead and keep them covered in the fridge until you need them. They taste great the next day, and the layers set up even more.
If you want them to last longer, freeze for up to 2 months. Thaw in the fridge overnight, then slice or serve cold.

A few quick answers
This section covers a few extra details that may help before you head to the recipe card.
Recipe FAQs
Are these the same as seven layer bars or hello dolly bars?
Pretty much, yes. Different families call them coconut pecan magic bars, seven layer bars, or hello dolly bars, but the idea is the same: graham cracker crust, sweetened condensed milk, and a layered topping.
Can I use walnuts or almonds instead of pecans?
Yes. Walnuts are the closest swap and work great. Almonds are good too, especially if you chop them fairly small so they stick into the topping.
Do I have to use butterscotch chips?
No. I like them for that classic flavor, but the bars are still excellent with just semi-sweet chocolate chips, coconut, and pecans.
How do I know when magic bars are done?
Look for golden edges and a center that looks set, not jiggly. The middle will still be soft when hot, but it firms up a lot as it cools and chills.
Can I use digestive biscuits instead of graham crackers?
Yes, digestive biscuit crumbs work really well and give a slightly different (but still familiar) flavor. Just use them the same way you would graham cracker crumbs.
You might also like
Before you go, take a look at a few other recipes below the recipe card. They use similar ingredients in a different way and are worth saving too.

Coconut Pecan Magic Bars
INGREDIENTS
Crust
- 1 and 1/2 cups graham cracker crumbs
- 1/2 cup unsalted butter melted
- 2 tbsp granulated sugar
- 1/4 tsp fine salt.
Topping
- 1 can 14 oz sweetened condensed milk
- 1 and 1/2 cups sweetened shredded coconut
- 1 cup semi sweet chocolate chips
- 1 cup chopped pecans
- 1/2 cup butterscotch chips optional
- flaky sea salt to taste optional.
INSTRUCTIONS
Prep
- heat oven to 350 F
- line a 9 inch by 13 inch baking pan with parchment paper leaving overhang and lightly grease
- mix graham cracker crumbs with melted butter sugar and salt until evenly moistened
- press firmly into an even layer and bake until set about 8 minutes.
Assemble and Bake
- pour sweetened condensed milk evenly over the warm crust
- sprinkle on chocolate chips then butterscotch chips if using then coconut then pecans and press lightly so the topping adheres
- bake until edges are golden and center is set about 20 minutes
- cool completely in the pan then chill 60 minutes for clean slices
- lift out using parchment and cut into bars.
