7-Layer Bars (Magic Cookie Bars)

Classic 7-layer bars by Jamielyn Nye—gooey layers of graham cracker crust, chocolate and butterscotch chips, pecans, sweetened condensed milk and coconut. Ready in 30 minutes, crowd-pleasing every time.

This recipe for 7-layer bars has been my go-to baking shortcut for holidays, potlucks and last-minute cookie swaps. I first made these on a rainy afternoon when I wanted something nostalgic and foolproof: one pan, handfuls of pantry staples and a sweet, chewy finish that reminds me of the treats my grandmother used to bring to church socials. The texture is a remarkable contrast of a crisp, buttery crumb base under gooey, saucy layers of chips, nuts and coconut that set into perfect bars.
I discovered this variation years ago while browsing a friend's recipe box; the condensed milk trick makes the layers meld without needing frosting, and the butterscotch chips add a warm caramel note that lifts the chocolate. We cut the pan into diamonds at family gatherings because the shapes feel festive, and a small square goes a long way thanks to their richness. These bars travel well, keep for days at room temperature and freeze beautifully, so they are a baker's best friend when entertaining or preparing treats for friends.
Why You'll Love This Recipe
- One-pan assembly: press a simple graham cracker crumb crust into a 9 by 13 inch pan and layer the mix-ins for minimal cleanup and maximum ease.
- Ready quickly: active work time is about 5 minutes and bake time is roughly 20 to 25 minutes, so total time is about 30 minutes from start to finish.
- Pantry-friendly: uses staples like graham crackers, sweetened condensed milk, chocolate and butterscotch chips—easy to keep on hand for spontaneous baking.
- Make-ahead friendly: they store at room temperature for several days or freeze for up to 2 months, perfect for holiday planning.
- Crowd-pleasing texture: crisp base, gooey center and a toasted top gives every bite contrast and deep flavor with minimal effort.
In my experience these bars disappear first at any bake sale. I once brought a pan to a neighbor's barbecue and watched them vanish within an hour; people raved about the butterscotch and coconut combination. They’re simple enough to let kids help with layering, yet polished enough for gifting with a ribbon.
Ingredients
- Graham cracker crumbs: 1 1/2 cups graham cracker crumbs (about 12 full sheets). I prefer Keebler for a slightly sweeter base; pulse in a food processor or crush in a sealed bag. The crumbs form a tender, slightly crunchy crust once mixed with melted butter.
- Butter: 1/2 cup (8 tablespoons) unsalted butter, melted. Melt and cool slightly to avoid melting the chocolate during assembly; the butter binds the crumbs and browns gently in the oven.
- Chocolate chips: 1 cup semisweet chocolate chips. Classic chocolate balance works best here; use 60 to 70 percent cacao chips for less sweetness, or milk chocolate for a sweeter bar.
- Butterscotch chips: 1 cup butterscotch chips (or substitute with white chocolate chips for a different flavor profile). These add a warm, caramel note that pairs wonderfully with the chocolate.
- Pecans: 1/2 cup chopped pecans, plus more to sprinkle on top. Toast lightly in a dry skillet for extra fragrance before adding to the pan.
- Sweetened condensed milk: 1 (14-ounce) can. The condensed milk creates a binding, glossy layer that caramelizes slightly during baking and keeps the bars chewy.
- Shredded coconut: 1 cup sweetened shredded coconut. Provides chew and a tropical lift; optional if you prefer a coconut-free version or want to swap with mini marshmallows or pretzels.
Instructions
Prep the pan:Preheat the oven to 350°F. Line a 9 by 13 inch baking dish with parchment paper or foil, leaving an overhang for easy removal. Lightly spray the lined pan with nonstick cooking spray to ensure the bars lift cleanly after baking.Make the crust:In a medium bowl combine 1 1/2 cups graham cracker crumbs with 1/2 cup (8 tablespoons) melted butter. Use a fork or pastry cutter to blend until the mixture resembles wet sand. Press the crumb mixture evenly into the bottom of the prepared pan using the back of a measuring cup to compact it firmly and create an even base.Layer the mix-ins:Evenly sprinkle 1 cup chocolate chips across the crust, followed by 1 cup butterscotch chips and 1/2 cup chopped pecans. Work gently to distribute the mix-ins so every square has a bit of each component; avoid pressing them into the crust at this stage.Add the binder and coconut:Pour the entire 14-ounce can of sweetened condensed milk in a slow, even stream over the top of the chips and nuts so it drizzles and settles between pieces. Finish by sprinkling 1 cup sweetened shredded coconut evenly across the surface to create the seventh layer.Bake:Bake in the preheated oven for 20 to 25 minutes, until the top is lightly golden and bubbling at the edges. The center should still be slightly soft to the touch; it will set as it cools. Watch carefully after 18 minutes to prevent over-browning of the coconut.Cool and cut:Let the pan cool completely on a wire rack, at least 1 hour. For diamonds, make horizontal cuts across the pan about 1 1/2 inches apart, then diagonal cuts 1 1/2 inches apart. Use a plastic knife or a warmed metal blade for cleaner slices. Gently lift bars using the parchment overhang.
You Must Know
- These bars store well at room temperature in an airtight container for 3 to 4 days or in the refrigerator for up to a week; freeze up to 2 months after cutting.
- They are high in sugar and fat per piece due to sweetened condensed milk and chips; expect rich flavor in small servings—one square is often enough.
- To prevent a soggy crust, press crumbs firmly and avoid pouring very hot melted butter directly onto cold crumbs; let butter cool slightly before mixing.
- To speed cooling, transfer the pan to the refrigerator after it comes to room temperature; this helps the center set without over-browning the top.
My favorite aspect is how reliably they bring people together. On chilly evenings I’ll make a pan and watch neighbors swing by for a piece and a cup of coffee. The toasted coconut aroma and the sight of glossy condensed milk ribboned through the chips always draw compliments. They’re a dessert that’s surprisingly sentimental in their simplicity.
Storage Tips
Store cooled bars in an airtight container layered with parchment to prevent sticking. At room temperature they remain fresh for three to four days. For longer storage refrigerate up to one week; bring to room temperature for 30 minutes before serving for the best chew. To freeze, cut into squares or diamonds, arrange in a single layer separated by parchment, then transfer to a freezer-safe container for up to two months. Thaw overnight in the refrigerator or on the counter for a few hours.
Ingredient Substitutions
If you dislike coconut, swap it with chopped pretzels for sweet and salty contrast or mini marshmallows for a softer top. For a nut-free version replace pecans with sunflower seeds or additional chocolate chips. If you want less sweetness, use dark chocolate chips and reduce butterscotch chips by half, or substitute white chocolate chips instead of butterscotch for a milder flavor. For a gluten-free base, use certified gluten-free graham crumbs or crushed gluten-free digestive biscuits; note the base texture may vary slightly.
Serving Suggestions
Serve squares alongside coffee, tea or a scoop of lightly whipped cream for a more elegant presentation. Garnish with a sprinkle of flaky sea salt to balance the sweetness or a dusting of cocoa powder for contrast. These bars pair well with fresh berries in summer or a small glass of dessert wine at holiday gatherings. For a playful dessert board, include several varieties—some with coconut, some with pretzels—to suit different palates.
Cultural Background
Often called magic cookie bars or seven-layer bars, this treat became popular in mid-20th century America as home bakers embraced boxed mixes and canned ingredients like sweetened condensed milk. The concept of layered bars appears across cultures as cooks adapt pantry staples into one-dish sweets. The American version emphasizes convenience and texture contrast: crumb crust, glossy condensed milk, chips and shredded coconut create a signature combination recognized in many household recipe boxes.
Seasonal Adaptations
For winter holidays, stir in cinnamon and chopped dried cranberries with the coconut and replace pecans with chopped walnuts for a seasonal twist. In summer, drop mini marshmallows between the layers and broil for a minute for a toasty finish reminiscent of s'mores. For a spring brunch, add a layer of chopped dried apricots and a sprinkle of toasted sesame seeds for an unexpected nutty lift.
Meal Prep Tips
Make bars up to a week ahead and store in the refrigerator; bring to room temperature before serving. For portion control and gifting, pre-cut diamonds and package in small boxes with parchment. If you plan to freeze, slice before freezing so guests can take single servings without thawing the whole pan. The simple assembly makes these bars ideal for batch baking when you need multiple pans for events.
These seven-layer bars are more than a dessert; they are a small ritual for holidays, a reliable offering for neighbors and a quick way to create nostalgia from pantry staples. I hope you make them your own and enjoy the gooey, toasty, crowd-pleasing results.
Pro Tips
Press the graham crumb mixture firmly into the pan to create a stable base that resists sogginess.
Cool completely before slicing; chilled bars cut cleaner and hold their shape better.
Toast the pecans briefly in a dry skillet to bring out oils and deepen the nutty flavor.
Use a warmed metal knife or plastic knife to slice for cleaner edges when cutting diamonds.
This nourishing 7-layer bars (magic cookie bars) recipe is sure to be a staple in your kitchen. Enjoy every moist, high protein slice — it is perfect for breakfast or as a wholesome snack any time.
FAQs about Recipes
How do I cut these into diamond shapes?
Yes. For diamonds, cut horizontal lines 1 1/2 inches apart, then diagonal lines 1 1/2 inches apart. A plastic knife or warmed metal blade cuts cleaner.
What is the best way to store the bars?
Wait until completely cooled to room temperature before covering, or chill to let the center set. Store at room temperature for 3 to 4 days or refrigerate up to a week.
Tags
7-Layer Bars (Magic Cookie Bars)
This 7-Layer Bars (Magic Cookie Bars) recipe makes perfectly juicy, tender, and flavorful steak every time! Serve with potatoes and a side salad for an unforgettable dinner in under 30 minutes.

Ingredients
Crust
Layers
Instructions
Prep the oven and pan
Preheat oven to 350°F. Line a 9 by 13 inch baking dish with parchment paper or foil and lightly spray with nonstick cooking spray.
Make the crust
Combine 1 1/2 cups graham cracker crumbs with 1/2 cup melted butter until evenly moistened. Press firmly into the bottom of the prepared pan using the back of a measuring cup.
Layer the chips and nuts
Evenly sprinkle 1 cup chocolate chips, then 1 cup butterscotch chips, and 1/2 cup chopped pecans over the crust, distributing so each piece will have a mix of ingredients.
Add condensed milk and coconut
Pour the 14-ounce can of sweetened condensed milk evenly over the top so it settles between the chips, then sprinkle 1 cup shredded coconut across the surface.
Bake and cool
Bake for 20 to 25 minutes until the top is lightly browned and bubbling. Cool completely on a wire rack before cutting into squares or diamonds.
Slice and store
Cut into 1 1/2 inch pieces or diamonds. Store in an airtight container at room temperature for 3 to 4 days or freeze up to 2 months.
Last Step: Please leave a rating and comment letting us know how you liked this recipe! This helps our business to thrive and continue providing free, high-quality recipes for you.
Nutrition
Did You Make This?
Leave a comment & rating below or tag
@velvetyum on social media!

Categories:
You might also like...

3 Ingredient Strawberry Yogurt Bites
Fresh strawberries, creamy vanilla yogurt, and crunchy granola come together in these portable frozen bites. A simple three ingredient snack that is perfect for breakfast, lunch boxes, or an icy treat.

30 Minute Chickpea and Tomato Coconut Curry Soup (Vegan + Gluten Free)
A cozy, 30-minute chickpea and tomato coconut curry soup made with pantry staples — creamy, vibrant, and naturally vegan and gluten free.

30-Minute Garlic Ginger Glazed Salmon (Gluten Free!)
A quick, pantry-friendly garlic-ginger glazed salmon that’s gluten free, soy free (when using coconut aminos), and naturally sweetened with honey — ready in 30 minutes and perfect for weeknight dinners.

Did You Make This?
Leave a comment & rating below or tag @velvetyum on social media!
Rate This Recipe
Share This Recipe
Enjoyed this recipe? Share it with friends and family, and don't forget to leave a review!
Comments (1)
This recipe looks amazing! Can't wait to try it.
Comments are stored locally in your browser. Server comments are displayed alongside your local comments.
Hi, I'm Emma!
What's Popular
30-Minute Meals!
Join to receive our email series which contains a round-up of some of our quick and easy family favorite recipes.

