
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.
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.

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.
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.
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.

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.
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.
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.
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.
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.
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.
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.
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.

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.
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.
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 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 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.
Leave a comment & rating below or tag
@platemint on social media!


Saucy, cheesy baked ziti with ricotta and basil tastes like lasagna in half the effort, perfect for weeknights or crowds.

Quick, crowd-pleasing cheeseburger sliders baked golden with melty cheddar and savory beef. Ready in 30 minutes, great for parties and easy meal prep.

Crispy air fryer sweet potato fries with tender centers, fast-food flavor without deep frying. Ready in minutes and irresistibly snackable.

Leave a comment & rating below or tag @platemint on social media!
Enjoyed this recipe? Share it with friends and family, and don't forget to leave a review!
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.

Join to receive our email series which contains a round-up of some of our quick and easy family favorite recipes.