Magic Cookie Bars (7-Layer Bars)
There's no mixer involved anywhere in this recipe, which is exactly why it's stayed a go-to for decades. You press a graham crust into the pan, pour condensed milk over it, layer on chocolate chips, coconut, and nuts, and bake. That's it. The condensed milk does all the binding work while it bakes, turning six separate ingredients into one cohesive, sliceable bar.
These go by a few different names depending on who taught you — magic bars, 7-layer bars, Hello Dolly bars — but the method is the same everywhere: layer, don't mix, and let the oven do the rest.
Table of Contents
Why This Recipe Works
Sweetened condensed milk isn't just a sweetener here — as it bakes, the sugars caramelize slightly and the milk proteins set, gluing the loose toppings (chocolate, coconut, nuts) into one solid, sliceable layer instead of a pile of separate ingredients. That's the entire mechanism behind why these bars hold together with zero folding or mixing required.
Ingredients
- ½ cup (113g) unsalted butter, melted
- 1½ cups (180g) graham cracker crumbs
- 1 (14 oz) can sweetened condensed milk
- 1½ cups (255g) semi-sweet chocolate chips
- 1 cup (85g) sweetened shredded coconut
- 1 cup (115g) chopped pecans or walnuts
📋 Recipe Card
Magic Cookie Bars
- ½ cup (113g) butter, melted
- 1½ cups (180g) graham crumbs
- 1 can (14oz) condensed milk
- 1½ cups (255g) chocolate chips
- 1 cup (85g) coconut
- 1 cup (115g) chopped pecans
- Mix melted butter with graham crumbs and press into a lined 9x13-inch pan.
- Pour condensed milk evenly over the crust.
- Sprinkle chocolate chips, then coconut, then nuts over the milk. Press down gently.
- Bake at 350°F (175°C) for 25-30 minutes until coconut is golden brown.
- Cool completely, at least 1 hour, before slicing into 16 bars.
Step-by-Step
Step 1: Make the Crust
Mix the melted butter with the graham cracker crumbs until evenly moistened, then press firmly into an even layer in a parchment-lined 9x13-inch pan.
Step 2: Pour the Condensed Milk
Pour the sweetened condensed milk evenly over the crust, tilting the pan slightly so it spreads to the edges.
Step 3: Layer the Toppings
Sprinkle the chocolate chips evenly over the condensed milk, followed by the coconut, then the chopped nuts. Press down very gently with your palms just to help the layers settle together.
Step 4: Bake
Bake at 350°F (175°C) for 25 to 30 minutes, until the coconut on top is golden brown and the edges look set and slightly bubbly.
Step 5: Cool and Slice
Cool completely in the pan, at least 1 hour, before lifting out with the parchment overhang and slicing into 16 bars. These need the full cool-down to hold together when sliced.
Pro Tips
- Press, don't pour, the crust: a firm, even press keeps the base from crumbling apart later.
- Let them cool fully: warm bars will fall apart when sliced — this is the single most common mistake with this recipe.
- Watch the coconut, not the clock: ovens vary, so use the golden-brown coconut color as your real doneness cue.
- Use a sharp, thin knife: and wipe it between cuts for the cleanest slices.
Storage & Make-Ahead
Store in an airtight container at room temperature for up to 5 days, or refrigerate for up to 10 days for extra firmness. These freeze exceptionally well — wrap individual bars and freeze up to 3 months, thawing at room temperature for about 20 minutes.
Variations & Substitutions
- Nut-free version: skip the nuts entirely or replace with an extra ½ cup of chocolate chips or coconut.
- Butterscotch swap: replace half the chocolate chips with butterscotch chips for a different flavor layer.
- Graham alternative: crushed digestive biscuits or vanilla wafers work in place of graham crackers.
- White chocolate version: use white chocolate chips instead of semi-sweet for a sweeter, lighter bar.
FAQ
Final Thoughts
This is the recipe I hand to anyone who says they "can't bake" — there's genuinely no way to mess up the technique since there isn't one beyond layering and waiting. It also happens to be one of the best make-ahead bars on this whole site.