Few desserts earn a spot on every holiday cookie tray the way seven layer bars do. They are sweet, chewy, crunchy and rich all at once, and they come together without a mixer, without a dough and with barely any dishes to wash.
My grandmother called hers magic bars, and I understood why the first time I watched her pour sweetened condensed milk over a pan of loose toppings. Twenty-five minutes later the whole thing had melted into one golden, bubbling slab. I have made the pan so many times since that I can do it half asleep, and I have learned a few tricks that keep the bottom crisp and the top from over-browning.
Here is the complete method, with swaps for people who do not love one layer or another, ways to make the bars easier to cut cleanly, and honest answers to the questions that come up every December.

What Makes These Magic Cookie Bars Work
The magic is chemistry. Sweetened condensed milk is thick and sugary, so as it bakes it caramelizes at the edges and sets into a soft, fudgy glue. It holds the chocolate, coconut and nuts together without any eggs or flour, which is why the recipe is so forgiving.
Each layer plays a role. The crust gives you a buttery base, the chips supply melty richness, the coconut toasts into chewy strands, and the nuts add crunch. Seven layers also means seven chances to personalize the pan.
I also love that this is a dessert almost anyone can make. There is no creaming, no whipping and no timing that has to be exact. Children can sprinkle the layers, and a beginner can bake a pan that looks like it came from a bakery. That is why it has been a staple of church suppers, bake sales and family reunions for generations, and why a plain 9×13 pan of it rarely lasts the evening.
- No mixer, no dough, no chilling
- Naturally nut-flexible and easy to adapt
- Holds well on a buffet and travels easily
- Uses only shelf-stable pantry ingredients
The Seven Layers, Explained
Here is what goes into the pan from bottom to top. Measurements are for a 9×13-inch pan.
A few notes on the ingredients make the pan even better. Use graham crumbs that are fine and sandy, either from a bag of crumbs or from crackers pulsed in a food processor, since big pieces make the crust loose. Choose sweetened flaked coconut rather than unsweetened, because the sugar helps it brown and stay soft. Toast the pecans in a dry skillet for four or five minutes until they smell nutty, and let them cool before sprinkling them on.
- Graham cracker crust: 1 1/2 cups fine crumbs mixed with 1/2 cup melted butter.
- Semisweet chocolate chips: 1 cup scattered over the crust.
- Butterscotch chips: 1 cup. Peanut butter chips or white chocolate also work.
- Sweetened shredded coconut: 1 1/3 cups, spread evenly.
- Chopped pecans: 1 cup, lightly toasted if you have time.
- Sweetened condensed milk: one 14-ounce can poured over everything, edge to edge.
- Finishing touch: a pinch of flaky salt on top, which balances the sweetness.
How to Make Seven Layer Bars
Set a rack in the middle of the oven and heat it to 350F (175C). If you are using a glass pan, lower the temperature to 325F (165C) so the edges do not scorch.
- Line a 9×13-inch pan with parchment paper, leaving two inches hanging over the long sides. Lightly grease the pan first so the paper stays put.
- Melt the butter and stir it into the graham cracker crumbs with a pinch of salt until the crumbs look like wet sand.
- Press the crumbs firmly into an even layer using the flat bottom of a measuring cup. Pressing hard keeps the crust from crumbling later.
- Sprinkle the chocolate chips over the crust, then the butterscotch chips, then the coconut, then the pecans.
- Slowly pour the condensed milk over the top, moving back and forth and finishing at the corners and edges. Tilt the pan if you need help spreading it.
- Bake 25 to 30 minutes, until the coconut is golden and the edges bubble.
- Cool in the pan at room temperature for at least 2 hours, then lift out with the parchment and slice.
Patience at the end matters. The bars look set when they come out, but the sugar is still molten and will smear the knife if you cut early.
About the pan: a metal pan gives the crispest bottom crust and the most even browning, while glass holds more heat and can darken the edges. If you only own glass, lower the oven by 25 degrees and check a few minutes early. A light-colored aluminum pan is my favorite for this recipe because it keeps the crust golden rather than dark.
Tips for Clean Slices and Chewy Texture
- Cool completely. Two hours at room temperature, or 30 minutes in the refrigerator if you are in a hurry.
- Use a sharp knife. Wipe the blade between cuts, or run it under hot water and dry it.
- Toast the coconut lightly. Five minutes in a dry skillet deepens the flavor.
- Do not overbake. Golden is enough. Dark brown condensed milk turns hard and bitter.
- Press down gently. After pouring the milk, lightly press the toppings so they stick.
The order of the layers is not sacred, but the condensed milk should always go on last so it can seep down through the toppings to the crust. If you pour it first, the chips sink and the coconut stays dry. Distribute the chips evenly so each bar gets some of every flavor, and avoid piling toppings in the center, which leaves thin edges.
Troubleshooting
- Bars crumble when cut: they were still warm, or the crust was not pressed firmly.
- Dry spots on top: the milk did not reach the edges and corners.
- Greasy crust: too much butter. Level the measuring cup and drain any extra.
Easy Variations to Try
The classic combination is wonderful, but this pan invites experimentation. Keep the total toppings near 4 cups and the condensed milk at one can.
- Holiday version: use red and green candy-coated chocolates and white chocolate chips.
- Nut-free: replace the pecans with extra coconut or crushed pretzels.
- Cookie crust: use chocolate wafer crumbs or crushed shortbread instead of graham crackers.
- Salted caramel: add 1/2 cup caramel bits and sprinkle with flaky salt.
- Toffee crunch: swap butterscotch chips for toffee bits.
Another caramel-forward bar for your dessert table is this recipe for caramel apple bars, and if you want a creamier pan, try salted caramel cheesecake bars.
One more idea for the holidays: bake the pan in a lined 9×13 and cut it into diamonds with a long knife. Diamonds look elegant on a cookie plate and give you edge pieces for everyone who loves the crisp, caramelized corner. If you are bringing a tray to a cookie swap, mix the bars with sprinkle-topped sugar cookies and a few chocolate pieces for a colorful mix.
Storage, Freezing and Make-Ahead
- Room temperature: airtight container with parchment between layers, up to 4 days.
- Refrigerator: up to 1 week. Bring to room temperature for the chewiest bite.
- Freezer: wrap squares individually and freeze up to 3 months. Thaw at room temperature for an hour.
- Make ahead: bake the pan up to 2 days before a party; the flavor actually deepens.
Food Safety
Because these bars use canned milk and nuts, keep them covered and away from heat. For storage guidance on baked treats and leftovers, review the USDA leftovers and food safety page.
For the freshest flavor, keep the pan covered with foil after the first day, and store any toasted pecan version away from strong smells, since butter and nuts pick up refrigerator odors easily. If bars become too firm in the cold, a ten second warm-up in the microwave brings back the soft, chewy center.
If you plan to ship these in the mail, wrap each square individually and pack them in a sturdy tin with crumpled parchment so they cannot shift. They travel better than most cookies because the condensed milk keeps them soft and dense.
Serving and Gifting
Cut the pan into 24 squares for a cookie tray, or into 12 large bars for dessert. Serve with coffee, cold milk or a scoop of vanilla ice cream. For gifting, wrap two bars in wax paper and tie with kitchen twine. The rich flavor means smaller squares are very satisfying, so I usually cut a tiny batch for sampling plates and a larger batch for lunch boxes.
Leftover bar crumbs make a wonderful ice cream topping or a quick parfait layer with whipped cream and berries, so nothing goes to waste.
Keep a small jar of extra toasted coconut nearby for sprinkling on top just before serving if you want a fresh, snowy look.
Frequently Asked Questions
Why are they called seven layer bars and magic bars?
Seven layer bars list the stacked ingredients, while magic bars refers to how loose toppings and condensed milk turn into one chewy slab in the oven. They are the same dessert.
Can I make seven layer bars without nuts?
Yes. Replace the nuts with an equal amount of coconut, crushed pretzels or extra chocolate chips. The bars stay chewy and the condensed milk still holds everything together.
Why did my bars turn out hard?
Overbaking is the usual cause, since the sugar in condensed milk keeps cooking as it cools. Pull the pan when the coconut is golden and the edges are just bubbling.
How do I get clean, neat squares?
Cool the pan fully, lift the slab out on the parchment and cut with a large sharp knife, wiping it between slices. Chilling for 30 minutes helps if the kitchen is warm.
Can I use a different pan size?
A 9×9 pan works if you halve everything, and a 8×8 pan works for a thicker batch with a longer bake of about 35 minutes. Keep the temperature the same and watch the edges.
If this tray-stealing treat is a keeper in your house, please leave a star rating and share your favorite layer swaps in the comments. For more sweets to fill your holiday platters, visit the dessert recipes page.

Seven Layer Magic Bars
Ingredients
Equipment
Method
- Heat oven to 350F (175C) and line a 9×13 pan with parchment.
- Mix crumbs, butter and salt and press firmly into the pan.
- Layer chocolate chips, butterscotch chips, coconut and pecans.
- Pour condensed milk evenly over the top, reaching the edges and corners.
- Bake 25 to 30 minutes until golden at the edges and bubbling.
- Cool completely, about 2 hours, then lift out and cut into 24 bars.
Notes
Chef Amber here: a pan of these bars on the counter makes any day feel like a holiday. Bake a pan, share it generously and save one corner square for yourself. Enjoy!
Free email bonus
30-Minute Meals
Loved this recipe? Get my collection of fast, family-favorite dinners, plus new seasonal recipes straight to your inbox.
