7-Layer Bars (Magic Cookie Bars)

These classic 7-layer bars—also called magic cookie bars—are built from a buttery graham crust and piled high with chocolate, butterscotch, pecans, coconut and sweetened condensed milk for an irresistibly gooey treat.

This batch of 7-layer bars has been a dessert table constant in my family for years. I first made them during a busy holiday season when I needed a fast, crowd-pleasing sweet that could be assembled in minutes and still taste homemade. The combination of a crisp, buttery graham base, melted condensed milk, and those signature layers of chocolate, butterscotch, coconut and pecans creates a textural contrast that keeps everyone coming back for one more square. They are nostalgic, simple, and nearly impossible to resist.
The beauty of this version is how little hands-on time it requires: about five minutes to assemble and roughly twenty-five minutes to bake. Because the layers are mostly pantry-stable ingredients, they are perfect for last-minute gatherings, potlucks, or as a make-ahead treat. I love that a single 9x13-inch pan yields 24 modest-sized bars—ideal for sharing with neighbors or taking to school events. The finished top should be lightly golden and slightly tacky where the condensed milk pooled, and once cooled the bars slice cleanly into diamonds or squares.
Why You'll Love This Recipe
- Ready in about 30 minutes from start to finish, perfect for busy days when you want homemade without fuss.
- Uses pantry staples like chocolate chips, sweetened condensed milk and graham crumbs; no specialty shopping required.
- Textural contrast: a firm, buttery crumb base with sticky, gooey layers and crunchy chopped pecans for balance.
- Highly adaptable—swap coconut for pretzels, marshmallows or extra nuts depending on preference or dietary needs.
- Great for make-ahead or freezing: slices keep well at room temperature or can be frozen for up to two months.
- Crowd-pleaser for all ages; the combination of chocolate and butterscotch is especially popular with kids and nostalgic adults alike.
In my house these bars have become the go-to when I don’t have time to bake elaborate desserts. I’ve taken them to block parties and school functions and the feedback is always the same: people ask for the recipe. One memorable holiday, a neighbor declared they taste like the exact cookies her grandmother used to make, which made me feel like I’d captured something timeless.
Ingredients
- Graham cracker crumbs (1 1/2 cups): I prefer Keebler graham crumbs for consistent texture. You want fine crumbs that press together easily; pulse whole graham crackers in a food processor if you buy sheets. This forms the crisp, buttery base that supports the layers above.
- Butter (1/2 cup / 8 tablespoons), melted: Use unsalted butter so you can control saltiness. Melt and cool slightly before combining with crumbs to avoid soggy spots in the crust.
- Chocolate chips (1 cup): Semi-sweet chips hold up well to baking without becoming grainy. Ghirardelli or Nestle Toll House are reliable choices.
- Butterscotch chips (1 cup): If you prefer, substitute half with white chocolate chips for a milder flavor. The butterscotch adds a deep caramel note that pairs beautifully with coconut.
- Chopped pecans (1/2 cup): Lightly toasting pecans for 5 minutes in a dry skillet brings out more flavor; roughly chop so you get small crunchy bits in each bite.
- Sweetened condensed milk (1 can, 14 ounces): This is the glue that binds the layers into that classic gooey finish. Pour it evenly so it seeps into gaps and melts chips slightly while baking.
- Sweetened shredded coconut (1 cup): Use flaked or shredded coconut depending on your texture preference. If you don’t like coconut, see substitutions below for pretzels or mini marshmallows.
Instructions
Prep:Preheat the oven to 350°F. Line a 9x13-inch baking dish with parchment paper or heavy-duty foil, leaving a 2-inch overhang for easy lifting. Lightly grease the lining with nonstick spray so the bars release cleanly after cooling.Make crust:Combine 1 1/2 cups graham cracker crumbs and 1/2 cup (8 tablespoons) melted butter in a medium bowl and mix with a fork until evenly moistened. Press the crumb mixture firmly into the bottom of the prepared pan, making sure to create an even, compact layer; use the bottom of a measuring cup for a smooth finish. A compact crust prevents the bars from falling apart.Assemble layers:Sprinkle 1 cup chocolate chips evenly over the crust, followed by 1 cup butterscotch chips, and then 1/2 cup chopped pecans. Pour the entire 14-ounce can of sweetened condensed milk gently over the toppings so it covers the surface without washing the chips away. Finish with 1 cup shredded sweetened coconut, distributing it in a single even layer.Bake:Bake in the preheated 350°F oven for 20 to 25 minutes, or until the coconut and top edges are lightly browned and the condensed milk is bubbling gently along the edges. Watch closely the last 5 minutes to prevent over-browning.Cool and cut:Remove from oven and place on a wire rack. Let cool completely—at least 1 hour—before using the parchment overhang to lift the slab from the pan. Cut into 24 bars or diamond shapes. A plastic knife helps achieve clean cuts without dragging sticky layers.
You Must Know
- These bars store well at room temperature in an airtight container for 3 to 4 days; refrigeration extends life by a few days but can firm them up.
- Freeze cooled, cut squares in a single layer on a tray, then transfer to a freezer bag for up to 2 months; thaw overnight in the fridge or for a few hours at room temperature.
- This dessert contains dairy, nuts, coconut and gluten from graham crumbs—consider substitutions if you have dietary restrictions.
- Do not overbake: remove when the top is lightly browned to keep centers gooey rather than dry.
My favorite thing about these bars is their reliability. Over the years I’ve learned that evenly distributing the chips and pouring the condensed milk slowly ensures an even set. At family gatherings they disappear within an hour; a friend once told me she froze a batch and sent them as a care package because they travel well and arrive tasting just like homemade.
Storage Tips
Store cooled bars in a single layer or stacked with parchment between in an airtight container. At room temperature they remain soft and chewy for 3 to 4 days. Refrigeration will firm them—wrap tightly or use a sealed container to prevent the coconut from drying out. For long-term storage, freeze in a rigid container or freezer bag for up to 2 months. To freeze, cut into bar shapes first and arrange in a single layer on a baking sheet until firm, then transfer to a freezer-safe container with parchment between layers to prevent sticking. Thaw slowly in the refrigerator to keep layers from becoming overly sticky.
Ingredient Substitutions
If coconut is not your thing, replace the 1 cup shredded coconut with 1 cup mini marshmallows for a s'mores-like effect, or 1 cup crushed salted pretzels for a sweet-and-salty crunch. For a nut-free version, omit pecans and substitute toasted pumpkin seeds or extra chocolate chips. To make dairy-free, use vegan butter for the crust, dairy-free chocolate and caramel-style chips, and a can of sweetened condensed coconut milk if available—note texture and sweetness will vary slightly.

Serving Suggestions
Serve these bars at room temperature alongside coffee, milk, or hot tea. For a festive presentation, plate squares on a doily-lined tray and garnish with a sprinkle of chopped pecans or a dusting of powdered sugar. They pair well with vanilla ice cream if you want to offer a warm-and-cold contrast—micro-warm a slice for 6 to 8 seconds in the microwave and place a scoop of ice cream on top. For potlucks, cut into diamonds and arrange in overlapping rows for easy grabbing.
Cultural Background
Often called magic cookie bars, this style of layered bar became popular in mid-20th-century American home cooking for its simplicity and use of canned sweetened condensed milk. The term "magic" points to how the ingredients meld into a cohesive, indulgent bar with minimal effort. Variations proliferated in community cookbooks, potlucks and school bake sales, with regional twists adding nuts, different chips, or candies to make the bars feel personal and seasonal.
Seasonal Adaptations
Tailor the flavors for holidays—swap butterscotch for butterscotch and orange-flavored chips at Thanksgiving, or red and green M&M pieces at Christmas. In summer, consider adding dried cherries or raspberries for brightness. For autumn, toasted pecans and a pinch of ground cinnamon mixed into the coconut add warmth. Small changes to the chips or toppings let these bars fit any seasonal menu while keeping the same easy assembly.
Meal Prep Tips
Make the base and assemble the bars a day ahead; cover and refrigerate unbaked if you prefer to bake fresh the next day—add an extra 2 to 3 minutes to the baking time if chilled. Alternatively, bake fully, cool, cut, and portion into single-serve bags for grab-and-go snacks or lunchbox treats. Use parchment overhangs for easy removal and cleaner slicing when you prep multiple pans ahead of an event.
These 7-layer bars bring together convenience and classic flavor. Whether you’re making them for a potluck, holiday, or a simple weeknight dessert, they offer nostalgia, ease and that irresistible gooey bite that keeps people asking for more. Make them your own with the substitutions and tips above, and enjoy the smiles they’ll create.
Pro Tips
Press the graham crumb crust firmly and evenly into the pan using the bottom of a measuring cup for a sturdy base.
Pour the sweetened condensed milk slowly across the surface to avoid displacing the chips and create even coverage.
Use parchment paper with an overhang for easy removal and cleaner slicing.
Toast pecans briefly to intensify flavor but cool them before layering to avoid melting chips.
Allow the pan to cool completely before cutting to achieve clean edges and prevent messy squares.
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
Can I freeze these bars?
Yes. After cooling, cut into squares or diamonds and freeze in a single layer. Once firm, transfer to a freezer-safe container for up to 2 months. Thaw in the refrigerator overnight or at room temperature for a few hours.
How do I know when they are baked?
The bars are done when the coconut and edges are lightly browned and you can see the condensed milk bubbling at the edges. Overbaking will dry them out, so remove at 20 to 25 minutes.
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
Preheat and prepare pan
Preheat oven to 350°F. Line a 9x13-inch pan with parchment or foil with a 2-inch overhang; lightly grease the liner with nonstick spray.
Make the crust
Combine 1 1/2 cups graham cracker crumbs and 1/2 cup melted butter in a medium bowl. Mix until crumbs are evenly moistened, then press firmly into the bottom of the prepared pan using the back of a measuring cup.
Layer toppings
Sprinkle 1 cup chocolate chips evenly over the crust, followed by 1 cup butterscotch chips and 1/2 cup chopped pecans. Pour the 14-ounce can of sweetened condensed milk over the toppings, then finish with 1 cup shredded coconut.
Bake
Bake at 350°F for 20 to 25 minutes, or until the coconut and top edges are lightly browned and condensed milk bubbles at the edges. Avoid overbaking to keep the center gooey.
Cool and cut
Cool completely on a wire rack, at least 1 hour. Use the parchment overhang to lift from the pan and cut into 24 bars or diamonds. Store as directed.
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
@platemint on social media!

Categories:
You might also like...

3 Cheese Cavatappi
Ultra-creamy baked cavatappi swirled in a silky three-cheese sauce and crowned with a bubbly cheddar top. Crowd-pleasing comfort that never leaves leftovers.

3-Ingredient Strawberry Protein Balls
Sweet, portable, and simple — these three-ingredient strawberry protein balls are a quick snack you can make in ten minutes using pantry staples and fresh berries.

3 Ingredient Strawberry Yogurt Bites
Fresh strawberries, creamy vanilla yogurt, and crunchy granola come together in cute frozen bites that are perfect for breakfasts, snacks, or lunchbox treats.

Did You Make This?
Leave a comment & rating below or tag @platemint 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 Wendie!
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.

