
Search “7 layer cookies” and you will find two completely different desserts sharing one name — and half the recipes online never tell you which one they are making. This one is the magic bar: a buttery graham cracker crust layered with chocolate chips, butterscotch chips, coconut and pecans, all glued together by sweetened condensed milk. It is not an Italian rainbow cookie — almond sponge layers with jam and chocolate — and it is not our 7 Layer Salad or our Mexican 7-Layer Dip either, no matter how similar the names sound.
What makes this version different is the layer order, and one small step most recipes skip: the crust gets par-baked for 8 minutes before anything goes on top. That short bake seals the crumbs so the condensed milk cannot soak through — the difference between a bar that is chewy on top and crisp underneath, and one that is soggy all the way down. Fifteen minutes of work, about half an hour in the oven, and you have 24 golden, gooey bars.
Why You’ll Love It
- Chewy on top, crisp underneath. The par-baked crust stays firm while the milk turns to soft caramel above it.
- No mixer, no bowl, no fuss. Everything is built straight in the pan, layer by layer, with a measuring cup to press the crust down.
- Ready in 15 minutes of work. Stir, press, sprinkle, pour, bake — the oven and the cooling rack do the rest.
- The layer order is foolproof once you know it. Chips, then nuts, then milk, then coconut on top.
- A full pan feeds a crowd. Twenty-four bars from one 9×13 pan — the easiest dessert on a holiday table.
- Endlessly swappable. No butterscotch chips? Use peanut butter chips. No pecans? Walnuts work. The structure stays the same.
Ingredients

The Crust
- 1 1/2 cups graham cracker crumbs (about 12 full sheets) — The base and the first of the seven layers: buttery and sturdy enough to hold the bar. Buy pre-crushed crumbs or pulse whole sheets in a food processor until fine. Substitution: crushed digestive biscuits, or gluten-free graham cracker crumbs.
- 1/2 cup unsalted butter, melted (1 stick) — The glue of the crust and the second layer: it coats every crumb so the base bakes into a firm, sliceable slab. Substitution: salted butter — just leave out the fine sea salt.
- 1/4 teaspoon fine sea salt — A small pinch keeps the bars from tasting one-note sweet, and makes the caramel and chocolate taste stronger. Substitution: table salt.
The Layers
- 1 cup semi-sweet chocolate chips — The third layer and the backbone of the flavor: dark enough to balance the condensed milk. Substitution: dark chocolate chips, or milk chocolate chips for a sweeter bar.
- 1 cup butterscotch chips — The fourth layer, and the one that makes these taste like magic bars: warm brown-sugar and caramel notes. Substitution: peanut butter chips, white chocolate chips, or an extra cup of semi-sweet chips.
- 1 cup chopped pecans — The fifth layer: pecans add crunch and a toasty, buttery flavor, and soften just enough to bite cleanly. Chop coarse, not fine, so every bar gets real pieces. Substitution: chopped walnuts, or leave the nuts out for a nut-free pan.
- 1 can (14 ounces) sweetened condensed milk — The sixth layer, and the real magic: poured over the chips and nuts, it flows down, melts the chocolate, and bakes into a soft caramel that holds the bar together. Substitution: none — evaporated milk will not set, and dulce de leche is too thick to flow between the layers.
- 1 cup sweetened shredded coconut — The seventh and final layer: coconut goes on top so it toasts golden instead of sinking into the milk and turning gummy. Substitution: unsweetened shredded coconut, though the top toasts a little less golden.
- 1/2 teaspoon flaky sea salt, for sprinkling (optional) — A pinch over the bars before baking gives a salted-caramel finish that cuts the sweetness. Substitution: skip it.
How to Make 7 Layer Cookies
1 Preheat and Line the Pan
Preheat and line the pan. Heat the oven to 350 degrees F. Line a 9×13-inch pan with parchment, leaving an overhang on the two long sides as handles. Grease the pan lightly first so the parchment stays put.
2 Press in the Crust

Press in the crust. Stir the crumbs, melted butter and salt until every crumb looks damp. Tip into the pan and press into a firm, even layer with the flat bottom of a measuring cup, pushing into the corners. Bake 8 minutes, just until the edges look set. This par-bake keeps the crust crisp under the condensed milk.
3 Sprinkle the Chips and Nuts

Sprinkle the chips and nuts. Scatter the chocolate chips over the hot crust, then the butterscotch chips, then the pecans. Keep each layer separate and spread it edge to edge — bare patches are where the bars fall apart. Press down lightly with your palm.
4 Pour the Milk and Add the Coconut

Pour the milk and add the coconut. Drizzle the whole can of condensed milk slowly over the chips and nuts, edge to edge, so it flows down between them. Sprinkle the coconut over the top and press it down gently with a fork. Add the flaky sea salt now if you want the salted-caramel finish.
5 Bake Until Golden
Bake until golden. Bake 25 to 30 minutes, until the edges are golden, the coconut is lightly toasted, and the center is set but still gives slightly when pressed. Do not wait for the center to feel firm — it firms up as it cools.
6 Cool and Cut

Cool and cut. Cool the pan completely on a wire rack for at least 1 hour — warm bars fall apart the moment you lift them. For the cleanest cuts, chill the cooled slab 30 minutes, lift it out by the parchment handles, and cut into 24 bars, wiping the blade between cuts.
Technique: The Layer Order That Keeps Them Chewy, Not Soggy
Two things decide whether your bars are chewy or soggy: the crust before the milk arrives, and the order the layers go in.
The Par-Baked Crust: The One Step Most Recipes Skip
Condensed milk is mostly sugar and water, and raw crumbs drink it up. Pour it onto an unbaked crust and the crumbs soak it through before the oven even heats up. Baking the pressed crust for 8 minutes first dries the surface and melts the butter into a thin seal across the top — and that seal stops the milk from soaking through, so the crust stays crisp while the layers above turn to caramel.
The Layer Order, and Why It Matters
Count the layers from the bottom up: butter, graham cracker crumbs, chocolate chips, butterscotch chips, pecans, sweetened condensed milk, coconut. That order is not a suggestion — each layer has a job that only works in its place.
| Layer | Ingredient | Why it goes here |
|---|---|---|
| 1 | Unsalted butter, melted | Coats the crumbs |
| 2 | Graham cracker crumbs | Pressed firm, then par-baked |
| 3 | Semi-sweet chocolate chips | Melt first, anchor the layers |
| 4 | Butterscotch chips | Melt beside the chocolate |
| 5 | Chopped pecans | Toast between the chips and the milk |
| 6 | Sweetened condensed milk | Flows down, gluing everything |
| 7 | Sweetened shredded coconut | On top, so it toasts |
The milk must go over the chips and nuts, never under them: poured on top, it runs down to the crust, carrying heat so the chips melt and bond. Poured underneath, it pools and the chips sit dry. The coconut must go last: under the milk it floats up and bakes gummy; on top, it toasts and stays crisp.
Magic Bars vs Italian Rainbow Cookies: Two Different Desserts, One Name
This is the confusion that costs searchers the right recipe. Italian rainbow cookies are thin layers of almond sponge cake stacked with jam, coated in chocolate — a bakery cookie that takes hours and a stand mixer. Magic bars are a pan cookie: graham cracker crust, chips, coconut, nuts and condensed milk, baked in one pan with no mixing at all. Almond paste and food coloring means a rainbow cookie; a can of condensed milk and a 9×13 pan means this recipe — a magic bar, also sold as Hello Dolly bars, seven layer bars, and dream bars.
The Underbake Rule
Take the pan out when the edges are golden and the center still gives slightly. The bars finish setting on the rack as the milk firms into caramel. Slightly soft at 27 minutes means chewy at room temperature; fully firm at 32 minutes means dry by tomorrow.
Tips for the Best 7 Layer Cookies
- ✓ Par-bake the crust for the full 8 minutes. A pale, underbaked crust never seals, and the milk soaks straight through.
- ✓ Press the crust firmly, especially in the corners. A loose crust crumbles when you cut — the flat bottom of a measuring cup is the best tool.
- ✓ Spread every layer edge to edge. Bare patches are weak spots where the bars crack.
- ✓ Pour the milk slowly and evenly. A fast pour in one spot floods one corner and leaves the other side dry.
- ✓ Pull the pan a minute early, not a minute late. The center should still give slightly.
- ✓ Cool completely, then chill 30 minutes before cutting. Warm bars fall apart; a short chill makes neat, clean squares.
- ✓ Wipe the knife between cuts. A clean blade slices through the caramel layers instead of dragging them.
Variations
Peanut Butter Chip Magic Bars
Swap the butterscotch chips for peanut butter chips and the pecans for chopped salted peanuts. The bars turn into a peanut butter cup in bar form — richer, saltier, and the first to disappear.
White Chocolate Cranberry Holiday Bars
Swap the semi-sweet chips for white chocolate chips and the butterscotch chips for dried cranberries, and keep the pecans. The red and white top looks made for a Christmas cookie tray, and the tart cranberries cut the sweetness of the milk. Serve them next to Anise Cookies.
Nut-Free 7 Layer Cookies
Leave the pecans out and add an extra 1/2 cup each of chocolate chips and butterscotch chips instead. The bars hold together just as well — the nuts are a texture layer, not a structural one — and the pan is safe for nut-free parties.
Gluten-Free 7 Layer Cookies
Use gluten-free crumbs and check that your chips are certified gluten-free. The method, times and layer order do not change, and the bars taste identical.
What to Serve With 7 Layer Cookies
These bars are rich, so they belong next to things that cut the sweetness. A cup of black coffee or a glass of cold milk is the classic pairing — the bitterness of the coffee against the caramel milk is the whole reason the combination works. For a dessert table, serve them with a scoop of vanilla ice cream. On a holiday cookie tray, they sit happily beside Anise Cookies and Strawberry Bon Bons — one spiced, one fruity, one gooey. And for a Valentine’s dessert spread, pair them with Valentine Day Cupcakes.
Storage
At Room Temperature
Keep the cut bars in an airtight container at room temperature for up to 5 days, with parchment between layers if you stack them so the caramel tops do not stick. This is the best way to store them — the bars stay chewy and the crust stays crisp.
In the Fridge
Refrigerate in an airtight container for up to 1 week. Cold bars are harder and less chewy, so bring them back to room temperature for 20 minutes before serving.
Make-Ahead
Bake the full slab up to 2 days ahead, cool completely, cover tightly, and keep at room temperature. Cut just before serving so the edges stay neat. Do not bake more than 3 days ahead: the coconut loses its crispness and the crust softens.
Freezing
Freeze the cut bars for up to 3 months. Wrap each bar tightly, then pack in a freezer-safe container with parchment between layers. Thaw at room temperature for about 1 hour — never microwave them, or the chocolate melts out of the layers.
Frequently Asked Questions
Are 7 layer cookies the same as magic bars?
Yes — 7 layer cookies, magic bars, magic cookie bars, seven layer bars, Hello Dolly bars and dream bars are all the same dessert: a graham cracker crust layered with chips, coconut and nuts, held together by condensed milk.
Are 7 layer cookies the same as Italian rainbow cookies?
No — they are two different desserts that share a name. Italian rainbow cookies are thin layers of almond sponge cake stacked with jam and coated in chocolate. Seven layer cookies are a pan cookie: graham cracker crust, chips, coconut, nuts and sweetened condensed milk. Almond paste and food coloring means a rainbow cookie; a can of condensed milk means a magic bar.
Why did my 7 layer bars fall apart?
Usually one of three things: the crust was not pressed firmly, the milk did not cover the layers, or the bars were cut while warm. Press the crust hard, pour the milk slowly over the whole pan, cool completely — at least 1 hour — then chill 30 minutes before cutting.
Why are my 7 layer cookies soggy on the bottom?
Because the milk soaked into a raw crust. The fix is the par-bake: bake the pressed crust 8 minutes before adding the layers, so the milk cannot soak through and the base stays crisp.
Can I use evaporated milk instead of sweetened condensed milk?
No. Evaporated milk is not sweetened or thick enough — it will not caramelize or bind the layers. Only sweetened condensed milk works, and it must be the full 14-ounce can.
Can I make 7 layer cookies without nuts?
Yes — leave the pecans out and add an extra 1/2 cup of chocolate chips and 1/2 cup of butterscotch chips instead. The bars hold together just as well: the nuts are a texture layer, not the glue — the condensed milk holds the bars together.
How long do 7 layer cookies last?
Up to 5 days at room temperature, 1 week in the fridge, and 3 months in the freezer when each bar is wrapped tightly. Best in the first 2 days, while the coconut is still crisp.
Try These Next
- Anise Cookies — soft, spiced and old-fashioned — the perfect contrast.
- Valentine Day Cupcakes — fluffy, frosted and festive.
- Strawberry Bon Bons — sweet, fruity bites that balance a tray of rich bars.
- 7 Layer Salad — the other famous “7 layer” on this site.
- Homemade Buffalo Sauce
- Poblano Sauce

7 Layer Cookies
Ingredients
The Crust
- 1 1/2 cups graham cracker crumbs about 12 full sheets
- 1/2 cup unsalted butter melted (1 stick)
- 1/4 teaspoon fine sea salt
The Layers
- 1 cup semi-sweet chocolate chips
- 1 cup butterscotch chips
- 1 cup chopped pecans
- 1 can sweetened condensed milk 14 ounces
- 1 cup sweetened shredded coconut
- 1/2 teaspoon flaky sea salt for sprinkling (optional)
Instructions
- Heat the oven to 350 degrees F. Line a 9x13-inch baking pan with parchment paper, leaving an overhang on the two long sides to use as handles. Lightly grease the pan first so the parchment stays put.
- Stir 1 1/2 cups of graham cracker crumbs, 1/2 cup of melted unsalted butter and 1/4 teaspoon of fine sea salt together in a bowl until every crumb looks damp. Tip the mixture into the lined pan and press it into a firm, even layer with the flat bottom of a measuring cup, pushing it into the corners. Bake for 8 minutes, just until the edges look set and faintly golden.

- Scatter 1 cup of semi-sweet chocolate chips evenly over the hot crust, then 1 cup of butterscotch chips, then 1 cup of chopped pecans. Keep each layer separate and spread it edge to edge, then press everything down very lightly with your palm.

- Drizzle the whole 14-ounce can of sweetened condensed milk slowly and evenly over the chips and nuts, edge to edge. Sprinkle 1 cup of sweetened shredded coconut over the top in an even layer and press it down very gently with a fork. If using, sprinkle 1/2 teaspoon of flaky sea salt over the coconut now.

- Bake for 25 to 30 minutes, until the edges are golden brown, the coconut is lightly toasted, and the center is set but still gives slightly when you press it.
- Let the pan cool completely on a wire rack for at least 1 hour. For the cleanest cuts, chill the cooled slab in the refrigerator for 30 minutes, then lift it out by the parchment handles and cut into 24 bars with a large sharp knife, wiping the blade clean between cuts.

Notes
- Par-bake the crust for the full 8 minutes — a pale, underbaked crust never seals and the milk soaks straight through it.
- Press the crust firmly, especially in the corners — a loose crust crumbles when you cut.
- Spread every layer edge to edge — bare patches of crust are weak spots where the bars crack.
- Pour the milk slowly and evenly — a fast pour floods one corner and leaves the other side dry.
- Pull the pan a minute early, not a minute late — the center should still give slightly and firms up as it cools.
- Cool completely, then chill 30 minutes before cutting — warm bars fall apart.
- Wipe the knife between cuts for clean, neat squares.
- Keeps up to 5 days at room temperature in an airtight container, 1 week in the fridge, 3 months in the freezer.
- Do not use evaporated milk instead of sweetened condensed milk — it will not set or bind the layers.
- For a nut-free pan, leave out the pecans and add an extra 1/2 cup of chocolate chips and 1/2 cup of butterscotch chips.












