7-Layer Bars (Magic Cookie Bars) Recipe
If you’re craving something sweet, nostalgic, and ridiculously easy to make, you have to try these 7-Layer Bars (Magic Cookie Bars). This classic dessert is like a treasure chest of flavors and textures, combining a buttery graham cracker crust with layers of chocolate, butterscotch, nuts, coconut, and gooey sweetened condensed milk. Each bite is a perfect harmony of crunchy, chewy, and melting sensations that instantly bring a smile to your face. Once you make these, they’ll become your go-to treat for potlucks, family gatherings, or just a simple indulgence after dinner.

Ingredients You’ll Need
The magic of 7-Layer Bars (Magic Cookie Bars) comes from a handful of simple yet thoughtfully combined ingredients. Each one plays a special role, whether it’s building texture, delivering sweetness, or adding a touch of richness that makes this dessert unforgettable.
- Graham cracker crumbs: The perfect base for crunch and slight sweetness; you can buy them or DIY by pulsing crackers in a food processor.
- Salted butter, melted: Binds the crust together and adds a rich, buttery flavor that’s essential for the foundation.
- Semi-sweet chocolate chips: Classic chocolate flavor with a hint of bitterness to balance the sweetness.
- White chocolate chips: Adds creamy sweetness and contrast to the darker chocolate.
- Butterscotch chips: Brings a caramel-like depth and a hint of mellow warmth.
- Chopped pecans: Crunchy texture and nutty flavor, giving a heartier bite.
- Sweetened condensed milk: The gooey binder that holds the layers together and gives that luscious, almost caramelized finish.
- Sweetened shredded coconut: Adds chewy texture and tropical flair, perfectly balancing the other layers.
How to Make 7-Layer Bars (Magic Cookie Bars)
Step 1: Preheat and Prepare Your Pan
Start by heating your oven to 350 degrees Fahrenheit (175 Celsius). Line a 9×13-inch baking pan with parchment paper, ensuring you have an overhang on the edges. This makes lifting the bars out effortlessly once they’ve baked. Don’t forget to lightly grease the parchment with cooking spray so nothing clings.
Step 2: Mix the Crust
In a medium bowl, combine your graham cracker crumbs with the melted butter. Use a fork to mix until all crumbs are evenly coated and feel sandy but hold together when pressed. This mixture is your sturdy yet buttery foundation.
Step 3: Press the Crust Into the Pan
Firmly press your graham cracker-butter mix into the bottom of the pan. Use the back of a measuring cup or your fingers to create an even, smooth layer. This ensures an even bake and a satisfying crunch on every bite.
Step 4: Layer the Toppings
Now for the fun part! Sprinkle the semi-sweet chocolate chips, white chocolate chips, butterscotch chips, and chopped pecans evenly over your crust. This colorful array of bites creates the signature “7 layers” that make this recipe such a magic cookie bar.
Step 5: Add Sweetened Condensed Milk
Pour the entire can of sweetened condensed milk evenly over your pile of chips and nuts. This not-so-secret ingredient acts as the glue and the sweet, molten layer that bakes into a gorgeous, slightly caramelized coating.
Step 6: Top with Coconut
Finish your layering by sprinkling the shredded coconut evenly on top. This adds wonderful texture and a subtle hint of tropical flavor that elevates the bars beyond simple chocolate squares.
Step 7: Bake to Golden Perfection
Place your pan in the oven and bake for about 20 to 25 minutes. You’ll know they’re done when the top is golden brown and caramelized, bubbling slightly at the edges. Let them cool fully in the pan—patience here leads to bars that slice beautifully and hold their shape.
How to Serve 7-Layer Bars (Magic Cookie Bars)

Garnishes
These bars are delightful on their own, but adding a sprinkle of flaky sea salt over the top just before serving can create an incredible contrast that enhances all the sweet layers. You might also consider a dusting of powdered sugar for an elegant touch, or even a drizzle of melted chocolate for extra indulgence.
Side Dishes
Pairing your 7-Layer Bars (Magic Cookie Bars) with a scoop of vanilla ice cream or a dollop of freshly whipped cream takes the indulgence up a notch. Fresh berries on the side can add a bright, tart balance to the rich layers. For a cozy dessert experience, serve alongside a warm cup of coffee or a robust black tea.
Creative Ways to Present
Cut the bars into bite-sized squares for a party platter or serve them as thick rectangles on individual dessert plates with a garnish of mint leaves. You could also sandwich these bars between layers of vanilla ice cream in an ice cream sandwich format, turning a nostalgic dessert into a fun, new treat everyone will love.
Make Ahead and Storage
Storing Leftovers
7-Layer Bars (Magic Cookie Bars) keep beautifully in an airtight container at room temperature for up to four days. If your kitchen tends to be warm, storing them in the refrigerator will help maintain their shape and freshness without drying out the edges.
Freezing
You can freeze these bars for up to two months. Wrap them tightly in plastic wrap and then aluminum foil to prevent freezer burn. When you’re ready to enjoy, thaw them overnight in the fridge or for a couple of hours at room temperature before serving.
Reheating
If you prefer your 7-Layer Bars slightly warm, pop them in the microwave for 10 to 15 seconds or until just softened. Alternatively, warm individual slices in a preheated oven at 300 degrees Fahrenheit for around 5 minutes—just enough to enhance their gooey goodness without melting completely.
FAQs
Can I use salted butter if I only have unsalted butter?
Yes! If you’re using unsalted butter, just add a pinch of salt to enhance flavor, as the salted butter in the recipe helps balance the sweetness and enrich the crust.
Can I substitute the pecans with other nuts?
Absolutely. Walnuts, almonds, or even cashews work great. Just chop them into similar sizes so you keep that perfect texture balance in each bite.
Is it necessary to use sweetened shredded coconut?
Sweetened coconut offers the right amount of chew and added sweetness, but if you prefer a less sweet bar, you can use unsweetened shredded coconut without sacrificing texture.
Can I make these bars gluten-free?
Yes! Just swap out the graham cracker crumbs for a gluten-free alternative. Make sure to check that your other ingredients, like chips and nuts, are also gluten-free to keep the bars safe for those with sensitivities.
Why do the bars sometimes come out too soft or gooey?
This usually happens if the bars aren’t baked long enough or if the condensed milk layer is too thick. Be sure to bake until the top is golden and slightly caramelized, and don’t skip pressing the crust firmly so the bars can set properly.
Final Thoughts
These 7-Layer Bars (Magic Cookie Bars) are truly a special treat that combines the best of so many flavors and textures in one pan. Once you master this simple, no-fuss recipe, you’ll find endless joy sharing these bars with loved ones, or sneaking a piece when you need a little pick-me-up. Don’t hesitate—grab your ingredients and start baking your own batch of magic today!
Print7-Layer Bars (Magic Cookie Bars) Recipe
Delicious and easy-to-make 7-Layer Bars, also known as Magic Cookie Bars, featuring a crunchy graham cracker crust layered with a mix of chocolate chips, butterscotch chips, chopped pecans, sweetened condensed milk, and shredded coconut. These bars are perfect for satisfying your sweet tooth with a combination of textures and flavors.
- Prep Time: 15 minutes
- Cook Time: 20-25 minutes
- Total Time: 35-40 minutes
- Yield: 24 bars (about 2 dozen squares) 1x
- Category: Dessert
- Method: Baking
- Cuisine: American
- Diet: Vegetarian
Ingredients
Crust
- 1 ½ cups graham cracker crumbs (store-bought or made from about 10 graham crackers)
- 10 tablespoons salted butter, melted
Toppings
- 1 cup semi-sweet chocolate chips
- ½ cup white chocolate chips
- ½ cup butterscotch chips
- ½ cup chopped pecans
- 1 (14-ounce) can sweetened condensed milk
- 1 cup sweetened shredded coconut
Instructions
- Preheat oven: Preheat your oven to 350°F (175°C). Line a 9×13-inch baking pan with parchment paper, making sure there is an overhang on the sides to easily lift the bars out after baking. Lightly grease the parchment paper with cooking spray to prevent sticking, then set aside.
- Make the crust: In a medium bowl, combine the graham cracker crumbs with the melted salted butter. Stir well using a fork or spoon until the crumbs are evenly coated and resemble wet sand.
- Form the crust layer: Press the graham cracker mixture firmly and evenly into the bottom of the prepared baking pan. Use the back of a measuring cup or your fingers to compact the crust to create a smooth, solid base for the toppings.
- Layer the toppings: Evenly sprinkle the semi-sweet chocolate chips, white chocolate chips, butterscotch chips, and chopped pecans over the crust layer. Make sure the toppings are spread out to cover the surface uniformly.
- Add condensed milk: Pour the sweetened condensed milk evenly over the layers of chips and nuts, ensuring it covers as much of the surface as possible to help bind the ingredients together while baking.
- Top with coconut: Sprinkle the sweetened shredded coconut in an even layer over the top of the condensed milk and other ingredients, adding a sweet and chewy texture.
- Bake: Place the pan in the preheated oven and bake for 20 to 25 minutes. Monitor the bars until the top turns golden brown and slightly caramelized, indicating they are done.
- Cool and serve: Remove the pan from the oven and allow the bars to cool completely in the pan. Once cooled, use the parchment paper overhang to lift the bars out, then slice into squares with a sharp knife. Serve and enjoy your tasty 7-Layer Bars!
Notes
- For a nut-free version, omit the chopped pecans or substitute with sunflower seeds.
- Use unsalted butter if you prefer to control salt content; reduce added salt accordingly if using salted butter.
- Store bars in an airtight container at room temperature for up to 3 days or refrigerate for up to a week.
- Allow bars to cool completely before slicing to prevent crumbling.
- Can be made ahead and frozen for up to 2 months; thaw before serving.
Nutrition
- Serving Size: 1 bar (based on 24 bars)
- Calories: 250
- Sugar: 20g
- Sodium: 120mg
- Fat: 15g
- Saturated Fat: 8g
- Unsaturated Fat: 6g
- Trans Fat: 0g
- Carbohydrates: 29g
- Fiber: 2g
- Protein: 3g
- Cholesterol: 30mg
Keywords: 7-layer bars, magic cookie bars, layered dessert bars, graham cracker crust dessert, chocolate chip bars, easy dessert recipe