American · Dessert

Barres magiques (Magic Cookie Bars)

Magic cookie bars stack a buttery graham cracker crust with coconut, chocolate chips, butterscotch chips, and toasted pecans, all fused together by a can of sweetened condensed milk. The milk caramelizes at the edges as it bakes, so every bar is chewy in the middle with crackly, toffee-like corners. A quick par-bake of the crust keeps the bottom crisp instead of soggy, which is the one upgrade the classic dump-and-bake method needs.

Barres magiques (Magic Cookie Bars) · American dessert
Par Mira Chen · Senior recipe editor · Publiée 2026-07-02 · Mise à jour 2026-07-02
Aller à la recette →
Prép.
15 min
Cuisson
35 min
Repos
1 h
Total
120 min
Donne
One 9x13-inch (23x33 cm) pan, cut into 24 bars
Difficulté
Easy
#dessert#american#bar-cookies#potluck#holiday-baking
Réponse rapide · Réponse en 30 secondes

Heat the oven to 350°F (175°C) and line a 9x13-inch pan with parchment, leaving overhang on the long sides. Stir 150 g (1 1/2 cups) graham cracker crumbs with 115 g (1/2 cup) melted butter and a pinch of salt, press firmly into the pan, and par-bake 8 minutes. Pour one 396 g (14 oz) can of sweetened condensed milk evenly over the warm crust, then scatter on 120 g (1 1/3 cups) shredded coconut, 170 g (1 cup) semisweet chocolate chips, 85 g (1/2 cup) butterscotch chips, and 110 g (1 cup) chopped pecans. Press the toppings down gently with a spatula so the milk grabs them, and bake 23 to 27 minutes until the coconut is golden and the edges bubble. Cool completely in the pan, about 1 hour (chill 10 minutes for the cleanest cuts), then lift out and slice into 24 bars.

  • Par-bake the crust 8 minutes so the condensed milk doesn't soak in and turn the bottom soggy.
  • Press the toppings firmly into the condensed milk before baking or the top layer will flake off when you slice.
  • Cool completely before cutting; warm bars smear, but a fully set pan cuts into sharp squares with a hot, wiped knife.

Equipment

  • 9x13-inch (23x33 cm) baking pan
  • Parchment paper
  • Food processor or zip-top bag and rolling pin (for crumbs)
  • Medium mixing bowl
  • Flexible spatula
  • Wire cooling rack

Ingrédients

Crust

  • 150 g graham cracker crumbs, from about 10 full sheets
  • 115 g unsalted butter, melted
  • 1.5 g fine salt, skip if using salted butter

Layers

  • 396 g sweetened condensed milk, not evaporated milk
  • 120 g sweetened shredded coconut
  • 170 g semisweet chocolate chips
  • 85 g butterscotch chips, or more chocolate chips
  • 110 g pecans, roughly chopped, walnuts work too

Préparation

  1. ÉTAPE
    01

    Set a rack in the middle of the oven and heat it to 350°F (175°C). Line a 9x13-inch (23x33 cm) pan with parchment paper, leaving a few inches of overhang on the two long sides so you can lift the slab out later. A light mist of cooking spray under the parchment keeps it from sliding while you press the crust.

  2. ÉTAPE
    02

    In a medium bowl, stir the graham cracker crumbs, melted butter, and salt until the mixture looks like damp sand and holds together when squeezed. Tip it into the pan and press it into an even, compact layer with the flat bottom of a measuring cup, paying attention to the corners.

  3. ÉTAPE
    03

    Bake the crust for 8 minutes, until it smells toasty and the surface looks set. This brief bake firms the butter-crumb layer so the condensed milk sits on top instead of soaking through, which keeps the finished bars crisp on the bottom.

  4. ÉTAPE
    04

    Pour the sweetened condensed milk slowly over the warm crust in a zigzag pattern, then nudge it with a spatula to cover the surface edge to edge. Leave a thin border of about 1/4 inch (6 mm) bare at the pan walls if you can; the milk spreads as it heats and this reduces hard, stuck edges.

  5. ÉTAPE
    05

    Scatter the coconut evenly over the milk, followed by the chocolate chips, butterscotch chips, and chopped pecans. Lay a piece of parchment on top and press down firmly with your palms so every layer makes contact with the condensed milk. This press is what glues the bars together, so don't skip it.

  6. ÉTAPE
    06

    Bake for 23 to 27 minutes, until the coconut peeking through is deeply golden and the condensed milk bubbles at the edges of the pan. The center will still look soft; it sets as it cools. If the coconut browns before 20 minutes, tent the pan loosely with foil for the rest of the bake.

  7. ÉTAPE
    07

    Set the pan on a wire rack and let the bars cool completely, about 1 hour. For the sharpest slices, follow the hour on the counter with 10 minutes in the refrigerator so the chocolate and caramelized milk fully firm up.

  8. ÉTAPE
    08

    Use the parchment overhang to lift the whole slab onto a cutting board. With a large sharp knife, trim any dark caramel edges if you like, then cut 6 rows by 4 rows for 24 bars, wiping the blade with a warm damp towel between cuts for clean lines.

Make ahead

These bars are actually better made a day ahead; the layers fuse and slice more cleanly after an overnight rest. Bake, cool, and store the uncut slab tightly covered at room temperature, then slice just before serving. You can also press the crust into the pan and refrigerate it, covered, up to 2 days before par-baking and layering.

Storage

Store cooled bars in an airtight container with parchment between layers: 3 days at room temperature or up to 1 week refrigerated (they turn pleasantly chewy when cold). To freeze, wrap individual bars and freeze up to 3 months; thaw at room temperature for about 30 minutes.

Variations

Gluten-free

Swap the graham crackers for an equal weight (150 g) of gluten-free graham-style crackers or gluten-free gingersnaps and confirm your chips are certified gluten-free. The butter ratio and bake time stay exactly the same.

Salted caramel pretzel

Replace half the graham crumbs with crushed pretzels, skip the butterscotch chips in favor of chopped soft caramels, and finish the baked bars with flaky sea salt. The salty crust balances the sweet condensed milk beautifully.

Nut-free lunchbox version

Leave out the pecans and use 110 g (about 1 cup) of crushed pretzels or toasted rolled oats in their place for crunch. Double-check that your chips are made in a nut-free facility if allergies are a concern.

Serve with

A scoop of vanilla ice cream on a slightly warm barStrong black coffee or espresso to cut the sweetnessA cold glass of milk for an after-school snackOn a holiday cookie tray alongside gingerbread and spritz cookiesCrumbled over Greek yogurt as an indulgent breakfast-adjacent treat

Nutrition per serving

220 kcal 13 g fat 24 g carbs 3 g protein 18 g sugar 1 g fiber 90 mg sodium
Allergens: Gluten, Dairy, Tree nut, Soy
Diet: Vegetarian

Nutrition values are estimates based on the metric measurements. Adjust as needed.

Questions fréquentes

Why are they called magic bars?

The magic is in the method: there's no batter to mix and no eggs to bind. You layer everything straight into the pan and a single can of sweetened condensed milk seeps through the toppings in the oven, caramelizing and gluing the layers into cohesive bars. Magic bars go by other names too, including seven layer bars and hello dolly bars, and the recipes are essentially the same idea.

Can I make magic bars without coconut?

Yes. The coconut adds chew and toasty flavor but isn't structural, since the condensed milk does the binding. Replace it with an equal volume of rolled oats, crushed pretzels, or simply more chopped nuts and chips. Keep the total volume of toppings roughly the same, about 4 cups, so the milk can still reach and bind everything.

Why are my bars gooey and falling apart?

Almost always one of three things: the bars were cut while warm, the toppings weren't pressed into the condensed milk before baking, or the pan came out too early. Bake until the edges visibly bubble and the coconut is deep golden, press the layers firmly with parchment before baking, and cool the slab completely, ideally with a 10-minute chill, before slicing.

Can I use evaporated milk instead of sweetened condensed milk?

No, they aren't interchangeable here. Evaporated milk is unsweetened and thin, so it won't caramelize into the sticky binder that holds magic bars together; you'd end up with a soggy, crumbly pan. If you can't find condensed milk, simmer 600 ml (2 1/2 cups) of whole milk with 100 g (1/2 cup) sugar until reduced to about 400 g, then cool before using.

What size pan should I use, and can I halve the recipe?

A 9x13-inch (23x33 cm) metal pan is ideal; glass works but add 2 to 3 minutes to the bake. To halve the recipe, use an 8x8-inch (20x20 cm) pan, halve every ingredient including the condensed milk (about 200 g), keep the 8-minute par-bake, and start checking the main bake at 20 minutes.

Cooked this? Rate it.

Real ratings from real cooks. We only show a score once enough of you have weighed in — no fabricated stars.