magic cookie bar

title 1
magic cookie bar
⏱️ cook time 25 minutes
🍽️ servings 16
⚡ Difficulty easy

intro

Chewy, rich 7-layer magic cookie bars, loaded with buttery graham crust, chocolate, butterscotch, coconut, and nuts, held together by sweet condensed milk—pure nostalgic, no-fuss baking comfort.

Ingredients

Graham cracker crumbs 1 1/2 cups (from ~12 whole sheets)
Unsalted butter 1/2 cup (1 stick), melted
Sweetened condensed milk 1 (14oz) can
Semi-sweet chocolate chips 1 cup
Butterscotch chips 1 cup
Sweetened shredded coconut 1 cup
Chopped walnuts 1/2 cup
Flaky sea salt 1/4 tsp

Steps

1

Prep and line pan

Preheat oven to 350°F (175°C). Unroll a 12-inch sheet of unbleached parchment paper from the roll on the far left counter, and line the 9x9 inch matte steel baking pan, leaving 2 inches of parchment overhang on two opposite sides to use as lift handles later. Use the small stainless steel pastry brush to coat any exposed pan metal not covered by parchment with a thin layer of melted butter to prevent sticking.

Step 1
step1:Prep and line pan
2

Press crumb crust

Stir 1 1/2 cups finely crushed graham cracker crumbs together with the remaining melted unsalted butter until every crumb is evenly coated; the mixture will clump like damp sand when squeezed between your fingers. Pour the crumb mixture into the parchment-lined pan, then use the flat base of the 1-cup stainless steel measuring cup to press the crumbs into a tight, uniformly flat layer across the entire pan bottom, with no thin spots or loose crumbs.

Step 2
step2:Press crumb crust
Step 2
step2:Press crumb crust
3

Add chip layers

Evenly sprinkle 1 cup semi-sweet chocolate chips across the full surface of the pressed graham cracker crust, spreading them into a loose, even layer. Follow with 1 cup butterscotch chips, distributed evenly over the chocolate chips, so no large gaps of crust show through. Do not press the chips into the crust; they will melt and settle naturally during baking.

Step 3
step3:Add chip layers
4

Top with nuts coconut

Evenly sprinkle 1/2 cup chopped walnuts over the chocolate and butterscotch chip layer, followed by 1 cup sweetened shredded coconut. Spread both layers gently with your fingertips to create a uniform covering, so chips peek through only in small spots. Do not press these layers down.

Step 4
step4:Top with nuts coconut
5

Drizzle condensed milk

Slowly pour the full 14oz can of sweetened condensed milk in a thin, even stream across the entire coconut surface, working from the edges of the pan to the center to ensure full coverage. The thick, pale golden milk will seep down through the coconut, nut, and chip layers as it pours, binding all layers together; avoid dumping the full can in the pan center, which creates soggy, uneven bars.

Step 5
step5:Drizzle condensed milk
Step 5
step5:Drizzle condensed milk
6

Bake to golden

Carefully slide the prepared pan into the preheated 350°F (175°C) oven, positioned on the middle rack. Bake for 25 minutes, until the shredded coconut on top is toasted deep golden brown, and the edges of the bars are bubbling with melted chocolate and caramelized milk. The center will appear slightly soft and jiggly when you pull the pan out; it will set completely as it cools, so avoid overbaking which leads to hard, dry bars.

Step 6
step6:Bake to golden
7

Cool bars fully

Let the bars cool completely in the pan at room temperature for 2 full hours, until the center is firm to the touch with no residual warmth. For extra clean cuts, transfer the pan to the refrigerator to chill for 30 minutes after room-temperature cooling; warm bars will squish and pull apart when cut.

Step 7
step7:Cool bars fully
8

Lift and slice bars

Grasp the two overhanging parchment paper handles firmly, and lift the entire solid block of cookie bars straight up out of the baking pan, setting it flat on the light maple wood cutting board. Use the 8-inch chef's knife to cut the block into 16 equal 2-inch squares, wiping the knife blade clean between cuts for smooth, even edges. Sprinkle the top of the cut bars with 1/4 tsp flaky sea salt for a bright salty-sweet balance.

Step 8
step8:Lift and slice bars
Step 8
step8:Lift and slice bars

Tips

1.Don’t skip the 2-inch parchment overhang: these soft, chewy bars are nearly impossible to lift out of the pan in one solid piece without the paper handles, leading to crumbly, broken edges.
2.Wait the full 2 hours for bars to cool before cutting: slicing warm bars causes melted chocolate and condensed milk to ooze, resulting in messy, uneven slices instead of clean, distinct layers. Chilling cooled bars for 30 minutes makes cuts even sharper.
3.Customize add-ins to taste: swap walnuts for pecans or sliced almonds, or swap butterscotch chips for white chocolate or peanut butter chips, but keep the graham cracker crust and sweetened condensed milk base to retain the classic chewy magic bar texture.

✨ You May Also Like

Desserts & Baking
🍜 Italy

Creamy, coffee-kissed classic Northern Italian no-bake dessert, with layers of rum-spiked mascarpone cream, soft ladyfingers, and a rich cocoa dusting.

⏱️ 4 hours 3Desserts & Baking ★ 4.7
Desserts & Baking
🍜 France

Flaky, shatteringly crisp, buttery French croissants with golden exteriors and soft, airy layered interiors, perfect for pairing with coffee for a special morning treat.

⏱️ 12 hours Desserts & Baking ★ 4.5
Desserts & Baking
🍜 United States

Warm, spiced baked apples topped with a fluffy golden biscuit crust, this cozy dessert pairs perfectly with vanilla ice cream for cool-weather comfort.

⏱️ 55 minuteDesserts & Baking ★ 4.6
Desserts & Baking
🍜 United States

A star-spangled classic American blueberry pie with buttery flaky crust and bright sweet-tart filling, perfect for summer patriotic gatherings.

⏱️ 1 hour 25Desserts & Baking ★ 4.7
Desserts & Baking
🍜 United States

A beloved no-bake regional Maine candy with a chewy coconut-potato center coated in rich dark chocolate, a New England holiday staple since the 1870s.

⏱️ 2 hours 3Desserts & Baking ★ 4.8
Desserts & Baking
🍜 France

Luxuriously creamy, floral frozen custard made with aromatic Tahitian vanilla beans, boasting a smooth, rich texture that melts slowly on the tongue.

⏱️ 3 hours 3Desserts & Baking ★ 4.5

magic cookie bar:Frequently Asked Questions

1.Do I have to layer the ingredients in the exact listed order for the bars to turn out right? ▾
You don’t need to stick to a rigid layer order for the fillings, but always keep the pressed graham cracker crust as the bottom base, and pour sweetened condensed milk last so it seeps down to bind every layer. Swapping the order of chips, coconut, or nuts won’t ruin the texture, it just shifts the flavor distribution per bite.
2.How can I adapt these bars to be nut-free for allergy-friendly events? ▾
It’s super easy to make these nut-free! Simply swap the traditional chopped nut layer for an equal amount of extra chocolate chips, butterscotch chips, shredded coconut, or crushed salty pretzels for a fun twist. If baking for severe nut allergies, double-check all ingredient labels for cross-contamination warnings to keep treats safe for all guests.
3.Why do my bars turn out soggy instead of chewy and fully set? ▾
Sogginess usually stems from two common missteps: not pressing your graham cracker crust firmly enough into the pan, or slicing too early before the bars cool. Press crumbs tight with the flat bottom of a measuring cup, bake until edges are deep golden, and let bars cool a full 2 hours before slicing so layers set properly.
4.Can I use regular milk instead of sweetened condensed milk if I run out? ▾
Regular milk won’t work as a substitute here—sweetened condensed milk is thick, ultra-sweet, and has most of its water removed, which is what acts as the sticky “glue” holding all layers together as it bakes. In a pinch, you can simmer 2 cups whole milk with ⅔ cup sugar until reduced by half, but storebought gives the most consistent, nostalgic results.
5.How should I store leftover magic cookie bars, and how long do they stay fresh? ▾
Store fully cooled bars in an airtight container at room temperature for up to 5 days, separated by small sheets of parchment paper so they don’t stick together. You can also freeze individually wrapped bars for up to 3 months; just thaw them at room temperature for 20 minutes, and they’ll taste just as chewy as the day you baked them.
6.Can I swap graham cracker crumbs for a different crust base? ▾
Absolutely! Graham crackers are the classic pick, but equal amounts of crushed vanilla wafers, Biscoff cookie crumbs, crushed pretzels, or gluten-free graham crumbs work as a perfect 1:1 swap. Just keep the crumb-to-melted-butter ratio consistent (1 ½ cups crumbs to ½ cup butter) for a sturdy, buttery base that doesn’t fall apart.
7.Why do my bar edges burn before the center is fully set? ▾
This almost always happens when using dark metal or glass baking pans, which conduct heat faster than light-colored aluminum. If you only have dark pans, lower your oven temperature by 25°F, and line the pan with overhanging parchment for easy bar removal. Start checking for doneness at 22 minutes to avoid bitter, overcooked edges.

Comments (19)

1 week ago

Game changer for summer cookouts! I always show up with burgers and brats but decided to bring a sweet option this time. These bars are SO good, they were gone before the hot dogs even came off the grill. Super easy to throw together even when I’m half watching the grill and half chasing my dog around the yard.

5 days ago

So glad these were a cookout hit! They hold up really well in warm weather which makes them perfect for outdoor gatherings, no refrigeration needed for a few hours which is always a win.

3 days ago

Made these in my dorm’s tiny toaster oven for my floor potluck and people were literally banging on my door asking for the recipe. Only ding is I used salted butter by accident and it was a little too salty for my taste, still ate three bars though lmao.

2 days ago

Oh no, the salted butter mistake! I did that last time too, just added a handful of extra chocolate chips to balance it out and it worked perfectly.

2 days ago

Great tip from Tyler! If you only have salted butter on hand, just skip the extra pinch of salt in the crust recipe and it’ll turn out perfectly balanced. So stoked these worked out even in a dorm toaster oven!

2 weeks ago

I’ve been making 7-layer bars since my kids were little, and this recipe is exactly the one I used to scribble on an index card back in the 70s! Tastes exactly like I remember, no weird modern tweaks. My grandkids devoured a whole pan when they visited last weekend, even the picky one who only eats chicken nuggets.

5 days ago

Okay I was skeptical these would fit my mostly whole-foods diet but I caved and made them for my book club. Let me tell you, I ate two before the guests even arrived. I swapped the butterscotch chips for dark chocolate chips to cut the sweetness a little and it worked great. Only reason it’s not 5 stars is I wish there was a lower-sugar version!

3 days ago

Love that dark chocolate swap! We’re actually testing a lower-sugar version with unsweetened coconut and reduced-sugar condensed milk right now, keep an eye out for that variation in the next couple weeks!

yesterday

Brought these into the office for my birthday treat and my boss who never eats sweets asked me for the recipe before 9am. 25 minute cook time? Are you kidding? I got home at 7pm, made the whole pan, and was eating a warm bar while watching the game by 7:45. No fuss, no fancy equipment, perfect.

2 hours ago

Right?! I work 10 hour shifts and I still have time to make these on weeknights. I keep a stock of graham cracker crumbs and condensed milk in my pantry just for last minute dessert emergencies now.

30 minutes ago

Pantry staples for the win! These are designed to be as low-effort as possible so you don’t have to spend hours in the kitchen to make something everyone will rave about. Happy belated birthday!

2 hours ago

OMG, made these for the teacher appreciation luncheon today and I already got three text messages from other moms begging for the link. I added a handful of chopped pecans on top like my mom used to and it added the perfect little crunch. 10/10, will be making these for every school event from now on.

2 days ago

I’ve made these three times in the last two weeks, no shame. The combination of coconut, butterscotch, chocolate, and that gooey condensed milk is addictive. My roommate is threatening to hide the baking pans from me because I keep making them and he can’t stop eating them.

yesterday

LMAO same, I made a pan on Sunday and ate half of it before my roommate got home from class. Zero regrets, these are too good.

1 week ago

Packed a bunch of these cut into small squares for our day hike last weekend and they were the perfect trail snack. Dense, sweet, no messy melting even when it was 75 degrees out, gave me so much energy for the last steep mile up. Way better than boring store-bought granola bars.

just now

Wait why did I sleep on these for so long? I always thought magic bars were fussy to make but there’s literally no mixing, you just layer everything in the pan? That’s my kind of baking. Just pulled them out of the oven and my whole apartment smells like heaven.

just now

That’s the magic of them! No fancy mixing or complicated steps, just layer, bake, and enjoy. Hope that first bite lives up to the amazing smell!

1 week ago

Taste was great but mine came out a little runny in the middle? I followed the bake time exactly, maybe it’s the high altitude out here? I had to stick them back in for 10 extra minutes to set properly.

5 days ago

Ah, high altitude strikes again! At 5,000ft+ you’ll usually want to add 3-5 minutes of bake time and maybe an extra tablespoon of graham cracker crumbs to the crust to help everything set up. Glad they tasted great even with the extra bake time!

30 minutes ago

My wife usually handles all the baking in our house but I decided to surprise her after a long week of work. These were so easy even I couldn’t mess them up! She said they’re better than the ones her grandma used to make, which is the highest possible compliment I could get.

2 weeks ago

Made these for my weekly girls’ night and we ate the whole pan while watching rom-coms. I used a mix of milk chocolate and dark chocolate chips plus a sprinkle of flaky sea salt on top right when they came out of the oven. Game. Changer. The salt makes all the sweet flavors pop so much.

1 week ago

The flaky sea salt trick is genius! I’m totally stealing that for my next batch, I bet it pairs so well with the butterscotch chips.

2 weeks ago

I’ve been making magic bars for potlucks for years and this is hands down the best ratio of layers I’ve ever tried. No skimping on the coconut, not too many graham cracker crumbs, the sweetened condensed milk amount is perfect so every bite is gooey but not drippy. Absolute perfection.

1 week ago

Agreed! I’ve tried so many recipes that go way too heavy on the crust and it ends up dry, this ratio is spot on. My only note is I wish I’d bought extra coconut last time I made them, I was a little short.

5 days ago

So glad the layer ratios work for you! We tested this recipe so many times to get that perfect balance, no dry crust spots, no pools of undissolved condensed milk, just even gooey goodness all the way through.

5 days ago

I tried to make these vegan for my cousin who’s visiting, used vegan condensed milk and coconut oil instead of butter, and they still slapped! Only thing is the vegan butterscotch chips I found were kind of wack, so next time I’ll just use extra chocolate and coconut.

3 days ago

Love that vegan swap! We’ve tested them with coconut condensed milk too and it works beautifully, you’re so right that finding good vegan butterscotch chips can be tricky, extra chocolate is always a solid backup plan.

3 days ago

I added a swirl of peach jam on top before baking to give it a little Southern twist and OH MY GOODNESS. The sweet fruit cuts through the richness of the chocolate and condensed milk so perfectly. If you’re a peach fan you have to try it!

2 days ago

Meal prep win! I cut these into small bars and stuck them in individual snack baggies for the kids’ lunches all week. They keep perfectly in the fridge and my kids loved them, say they’re way better than the processed snack bars I used to buy. Saving so much money too!

yesterday

I do the exact same thing! My kids beg for these in their lunch boxes, it’s the only snack I don’t have to fight them to eat. Total game changer for busy school mornings.

3 days ago

My husband said these taste exactly like the magic bars his late mom used to make when he was a kid. I may have cried a little when he said that, I’ve been trying to find a copycat recipe for two years since we got married. Thank you so much for sharing this, it’s going to be a staple in our house forever.

2 days ago

Honey that just made my day. There’s nothing better than a recipe that brings back happy memories like that. I bet your husband’s mom would be so happy you’re making them for your family now.

yesterday

This is the exact reason we love sharing these classic recipes! Food is so tied to memory, and it means the world to hear these bars are helping you carry on those special family moments. Cheers to many years of making them together!

5 days ago

Wait a second, I made these last night and added a layer of crushed pretzels to the crust for a salty-sweet twist and my family went feral for them. My oldest kid who is going through a super picky teen phase asked if we could have these every Friday night as our new family tradition.

3 days ago

The pretzel crust twist sounds insane! I’m doing that for our next Sunday dinner, my kids go crazy for anything salty-sweet. Do you just replace half the graham cracker crumbs with crushed pretzels?

2 days ago

That pretzel twist is such a fun idea! We love hearing creative variations from readers. To answer SundayDinnerDad’s question, yes — swapping ½ cup of graham cracker crumbs for finely crushed pretzels works perfectly and adds that amazing salty crunch without making the crust too crumbly.

2 weeks ago

Solid recipe, made it for our neighborhood block party and the pan was empty in 15 minutes. Only note is I’d press the crust a little firmer next time, mine was a little crumbly when I cut into squares. Still tasted amazing, just messy to eat standing up while chatting with neighbors.