Magic cookie bars / Seven-layer bars

title 1
Magic cookie bars / Seven-layer bars
⏱️ cook time 35 minutes
🍽️ servings 12
⚡ Difficulty easy

intro

Rich, no-mix layered bar cookies with a buttery graham base, coconut, chocolate, butterscotch, and nuts—just layer, bake, and cool for a foolproof, crowd-pleasing treat.

Ingredients

Graham cracker crumbs 1 ½ cups (150g)
Unsalted butter ½ cup (113g / 1 stick), melted
Semi-sweet chocolate chips 1 cup (175g)
Butterscotch chips 1 cup (170g)
Sweetened shredded coconut 1 ½ cups (115g)
Chopped walnuts 1 cup (100g)
Sweetened condensed milk 1 (14-oz / 396ml) can

Steps

1

Preheat oven and prep pan

Preheat your oven to 350°F (175°C). Melt the ½ cup (113g) of unsalted butter in the microwave (30 seconds on high) or small stovetop pan over low heat until fully liquid. Line a 9x13 inch (23x33cm) baking pan with parchment paper, leaving a 2-inch overhang on the long sides for easy lifting later. Pour the melted butter directly into the lined pan, tilting to spread evenly across the entire bottom.

Step 1
step1:Preheat oven and prep pan
2

Press graham cracker crust

Sprinkle the 1 ½ cups (150g) of graham cracker crumbs evenly over the melted butter. Use the flat bottom of a dry 1-cup measuring cup to press the crumbs firmly into a compact, uniform layer across the pan base, avoiding deep mixing of crumbs into the butter below to keep layers distinct.

Step 2
step2:Press graham cracker crust
3

Layer chocolate and butterscotch chips

Sprinkle the 1 cup (175g) of semi-sweet chocolate chips in an even, loose layer over the pressed graham crust, followed by a uniform layer of the 1 cup (170g) of butterscotch chips. Do not stir or press the chips down, as this will disrupt the clear seven-layer structure.

Step 3
step3:Layer chocolate and butterscotch chips
4

Top with coconut and walnuts

Spread the 1 ½ cups (115g) of sweetened shredded coconut in an even layer over the chips, then sprinkle the 1 cup (100g) of chopped walnuts uniformly across the coconut. Lightly pat the surface with the palm of your hand to help layers adhere, without pressing firmly enough to crush the chips below.

Step 4
step4:Top with coconut and walnuts
5

Drizzle condensed milk evenly

Slowly pour the entire 14-oz (396ml) can of sweetened condensed milk over the nut layer, covering every section of the surface from edge to edge to prevent dry spots. The thick, sweet milk will seep down through the dry layers during baking to bind all ingredients together.

Step 5
step5:Drizzle condensed milk evenly
6

Bake until golden and set

Place the pan on the middle rack of the preheated 350°F (175°C) oven. Bake for 25 minutes, until the edges are deep golden and bubbly, and the center has a slight, soft jiggle when the pan is gently nudged. Avoid overbaking, which will result in dry, tough bars instead of chewy, gooey ones.

Step 6
step6:Bake until golden and set
7

Cool, slice, and serve

Remove the pan from the oven and transfer to a wire rack to cool completely for 30 minutes at room temperature, then chill for 15 minutes in the fridge to set fully. Use the parchment overhang to lift the entire bar block out of the pan, then cut into 12 equal 2x3 inch squares with a sharp knife.

Step 7
step7:Cool, slice, and serve

Tips

1.Never stir the layers as you assemble the bars: the distinct, loose layers create the signature seven-layer texture, and the condensed milk will bind everything together as it bakes without mixing.
2.Wait until bars are fully cooled and set before cutting: warm bars will crumble apart, as the melted chocolate and condensed milk need time to firm up into clean, sliceable squares.
3.Customize layers to taste: swap walnuts for pecans, replace butterscotch chips with peanut butter or white chocolate chips, or add a ¼ teaspoon sprinkle of flaky sea salt on top before baking. Keep total dry add-ins to 4 ½ cups to avoid pan overflow during baking.

✨ 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 bars / Seven-layer bars:Frequently Asked Questions

1.Why do my magic cookie bars fall apart and turn crumbly when I try to cut them? ▾
This almost always comes down to two easy-to-fix missteps: not pressing the graham cracker base firmly into the pan, or slicing too early. Mix crumbs evenly with the full measured amount of melted butter, press the base into a tight, even layer across the pan, and let bars cool a full 2 hours before cutting so layers set properly.
2.Can I swap or leave out ingredients like butterscotch chips or nuts if I don’t have them on hand? ▾
Totally! These bars are famously flexible, so you don’t have to stick rigidly to the classic layer lineup. The only non-negotiable for that signature chewy, sturdy texture is the firmly pressed, buttery graham cracker base. Swap butterscotch for peanut butter or white chocolate chips, skip nuts for allergy needs, or adjust coconut amounts to match your taste preferences.
3.How should I store leftover magic cookie bars to keep them chewy instead of dried out? ▾
Let bars cool fully to room temperature first, then slice and stack them in an airtight container with small sheets of parchment between layers to prevent sticking. They’ll stay perfectly chewy for up to 5 days at cool room temperature away from direct sunlight, or you can freeze them for up to 3 months for an easy make-ahead treat.

Comments (11)

2 days ago

OMG these are SO good! I threw these together last night for my kid’s soccer team snack and every single parent asked for the recipe. 35 minutes total? No way, it felt like I spent 10 minutes prepping tops. Used extra dark chocolate chips because that’s what we had in the pantry and it was chef’s kiss. 10/10 will be making these for every potluck from now on.

yesterday

Wait did you line the pan with parchment? I made a different seven layer bar recipe once and they stuck so bad I had to chisel them out lmao

yesterday

So glad the team loved them! Pro tip for anyone worried about sticking: lining your pan with overhanging parchment makes lifting the whole slab out to cut so much easier, no chiseling required!

1 week ago

Game changer alert! I swapped the regular graham cracker crumbs for gluten free grahams and didn’t change a single other thing, and my whole family (none of whom are gluten free) didn’t even notice a difference. These are perfectly chewy, not too sweet, and the butterscotch layer hits so hard. My only regret is not doubling the batch because they were gone in 12 hours flat.

5 days ago

Love that gluten free swap! I’ve tested this recipe with GF graham crumbs a handful of times and it works perfectly every time—so happy your crew enjoyed them!

3 days ago

Brought these to our neighborhood block party this weekend and I swear people were coming back for thirds. The recipe is so easy even my 10 year old was able to help layer everything, which made it a fun weekend activity too. The crunch from the walnuts paired with the gooey condensed milk is just unbeatable. No notes, 10/10.

5 days ago

Wait, is there a trick to getting the coconut to not burn on top? I followed the cook time exactly and the edges of the coconut got pretty dark, even though the middle was perfectly set. Flavor was still insane, I ate half the pan while binging Netflix last night tbh, but I wanna nail the look next time.

3 days ago

I had this same problem my first batch! I started tenting a little piece of foil over the top for the last 10 minutes of baking and the coconut stays perfectly golden without burning. Game changer!

3 days ago

Great tip from Marnie! Oven temps can vary a lot, so if yours runs hot, that loose foil tent for the last 10 minutes will keep the coconut from toasting too fast. So glad the flavor was still spot on for you!

yesterday

My kids loved these so much that they asked me to put them in their school lunch every day this week. I cut them into smaller bite-sized pieces so they’re perfect for little hands, no mess. Way better than the processed granola bars I usually buy for meal prep, and so much cheaper to make at home.

2 hours ago

Quick question—did you use the walnuts the recipe calls for? My kid’s classroom is nut free so I’m wondering if I can just leave them out or swap for something else!

30 minutes ago

I swapped the butterscotch chips for peanut butter chips because that’s my favorite combo and HOLY COW. If you’re a peanut butter and chocolate fan, do yourself a favor and try that swap. It tastes like a Reese’s cup but chewier, more coconutty, just perfect. So easy, no fancy equipment needed, I already have the ingredients out to make another batch tonight.

2 weeks ago

I brought these in for our office bake off and WON first place, no cap. Everyone kept saying they tasted exactly like the seven layer bars their grandma used to make, which is the highest compliment you can get honestly. The recipe is so straightforward I didn’t even have to stress about messing it up the night before, even after a long work day. 100% adding this to my permanent recipe rotation.

1 week ago

Wait were you the one who brought these to the 3rd floor bake sale last month?? I had one and thought about it for DAYS. I’ve been searching for a recipe that tastes like those ever since, can’t wait to try it!

1 week ago

Huge congrats on the bake off win! There’s a reason these are a classic—they hit that nostalgic note every single time. So happy they were a hit with your coworkers!

5 minutes ago

Full transparency: I forgot to add the butter on top of the graham cracker crust and was convinced I ruined the whole batch, but they still turned out amazing?? How is that even possible? The condensed milk soaked into the crumbs just enough to hold the crust together, and all the layers still set perfectly. I’ll add the butter next time, but wow, this recipe is foolproof even for airheads like me.

just now

Happy they still turned out for you! The melted butter does help the crust hold together a little tighter, but all that gooey condensed milk definitely does a lot of the heavy lifting too—totally get those distracted baking moments, we’ve all been there!

1 week ago

I make seven layer bars every Christmas for our cookie tins, and this is by far the best version I’ve ever tried. The ratio of chocolate to butterscotch to coconut is perfect—no single layer overpowers the others. I didn’t have to adjust a single measurement, which is rare for online recipes. My husband already asked if we can make a batch just for us before we start filling the tins for neighbors.

2 hours ago

I made these vegan by swapping the condensed milk for coconut condensed milk and using dairy free chocolate/butterscotch chips, and they came out INCREDIBLE. You literally can’t tell they’re vegan, my meat-and-potatoes dad ate three and had no idea. I was worried the swaps would mess with the texture, but they were just as chewy and gooey as the original.

30 minutes ago

Oh thank you for sharing this swap! My son is dairy allergic and I’ve been looking for a seven layer bar recipe I can adapt for him, this is perfect. Can’t wait to test it this weekend!

just now

I’ve literally never baked anything from scratch before in my life, and I picked this recipe because it said easy. Y’ALL. I did it! The bars came out perfect, my roommate said they’re the best thing I’ve ever made (not a high bar, but still). I didn’t even mess up the layers! I was so proud I took a million photos to send to my mom. 10/10 for beginner bakers, no fancy skills required.

just now

Hi Sam, it’s Mom! I’m so proud of you for baking! Save me a piece when I come visit next month, okay? They look amazing in the photos you sent 😊

just now

This is what we love to see! Baking should be fun and accessible for everyone, even total beginners. Congrats on nailing your first from-scratch bake—you should be so proud!