Magic cookie bars are chewy, layered dessert squares made with a buttery graham cracker crust, sweetened condensed milk, chocolate, coconut, and nuts. The condensed milk binds the toppings as they bake, so there’s no need to mix a separate filling; the key is to let the bars cool completely before slicing.
Ingredients
- 1/2 cup (113 g) unsalted butter
- 1 1/2 cups (about 170 g) graham cracker crumbs
- 1 can (14 oz/396 g) sweetened condensed milk
- 1 cup (170 g) semisweet chocolate chips
- 1 cup (about 85 g) sweetened shredded coconut
- 1 cup (120 g) chopped pecans or walnuts
- 1/2 cup (85 g) butterscotch chips
- 1/4 teaspoon fine salt, optional
Instructions
- Prepare the pan. Heat the oven to 350°F (175°C). Line a 9-by-13-inch baking pan with parchment paper, leaving enough overhang on two sides to lift out the cooled bars. A metal pan gives the most even, predictable bake.
- Make the crust. Melt the butter and pour it into the pan. Sprinkle the graham cracker crumbs evenly over the butter, then stir or press them together with a fork until all the crumbs look moistened. Press firmly into an even layer, especially around the corners. If using salt, mix it into the crumbs.
- Add the condensed milk. Pour the sweetened condensed milk slowly and evenly over the crust. Spread it gently toward the edges with the back of a spoon, taking care not to pull up the crumb layer.
- Layer the toppings. Scatter the chocolate chips, butterscotch chips, coconut, and chopped nuts evenly over the milk. Press the toppings down very lightly with your fingertips or a spatula so they make contact with the condensed milk. Don’t pack them tightly; a loose, even layer bakes best.
- Bake. Bake for 25–30 minutes, until the edges are golden brown and the coconut has toasted in places. The center may look soft and the chocolate will be melted, but the bars should not be bubbling vigorously or dark brown. If the coconut browns early, tent the pan loosely with foil for the remaining time.
- Cool completely. Set the pan on a wire rack and leave it undisturbed for at least 2 hours, or until the center is fully set and close to room temperature. For especially neat cuts, chill the pan for 30–60 minutes after it has cooled.
- Cut and serve. Use the parchment overhang to lift the slab onto a cutting board. With a sharp knife, cut into 24 small squares or 16 larger bars, wiping the blade clean between cuts. If the bars are chilled, let them sit at room temperature for about 10 minutes before serving for a softer bite.
Tips
- Use sweetened condensed milk, not evaporated milk. They are different products: condensed milk is thick and sweet and helps the layers set. Evaporated milk will not give the same texture. Check the can label, and use the full 14-ounce can.
- Press the crust firmly and spread ingredients evenly. A loose crust can crumble, while thick pockets of condensed milk may stay sticky. Press the crumbs into a compact, level base and distribute the toppings across the whole pan.
- Choose substitutions with similar amounts. Swap the pecans for walnuts, almonds, or sunflower seeds, or replace the butterscotch chips with extra chocolate chips. Unsweetened coconut works too, though the bars will taste less sweet and the coconut may toast sooner.
- Wait before slicing. Warm bars are fragile and can seem underbaked even when they will set as they cool. For clean edges, cool fully, chill briefly if needed, and use a sharp knife rather than trying to cut straight from the oven.
Serving Suggestions
Serve the bars at room temperature or slightly chilled, cut into small squares because they are rich and sweet. They pair well with black coffee, hot tea, or a glass of cold milk. For dessert, add a small scoop of vanilla ice cream or a few fresh berries. If serving a crowd, cut the slab into 24 pieces; for a more substantial treat, make 16 bars. Keep any remaining bars covered between servings rather than leaving the whole pan out for hours.
Variations
For a classic chocolate-and-nut version, omit the butterscotch chips and use 1 1/2 cups of chocolate chips total. For a peanut butter twist, use peanut butter chips in place of the butterscotch chips and chopped roasted peanuts instead of pecans. A nut-free batch can use extra chocolate chips or toasted sunflower seeds; check all package labels for cross-contact warnings if allergies are a concern.
You can also change the crumb base: use finely crushed vanilla wafer or digestive biscuits in place of graham crackers, keeping the amount at 1 1/2 cups. Biscuit sweetness varies, so choose a plain variety if you want to avoid making an already-sweet bar even sweeter. Keep the overall topping quantities close to the recipe so the condensed milk can bind the layers.
Storage and Reheating
Once completely cool, store the bars in an airtight container at room temperature for up to 3 days, or refrigerate them for up to 1 week. Separate layers with parchment to prevent sticking. Refrigeration makes the bars firmer; let a portion stand at room temperature for 10–15 minutes before eating if you prefer a softer texture. For longer storage, freeze cut bars in a sealed, freezer-safe container with parchment between layers for up to 2 months. Thaw overnight in the refrigerator or for about an hour at room temperature. These bars are served cool or at room temperature, so reheating is unnecessary; warming them can make the chocolate and condensed milk sticky.
Frequently Asked Questions
Do I need to grease the pan?
Line the pan with parchment for easy removal and clean cuts. The butter in the crust generally makes extra greasing unnecessary, though a small amount of nonstick spray under the parchment can help it stay in place.
Can I make magic cookie bars without coconut?
Yes. Replace the coconut with an equal amount of extra chocolate chips, chopped nuts, or a mix of both. The topping may be a little less chewy, but the condensed milk will still hold it together.
How can I tell when the bars are done?
Look for golden edges and lightly toasted coconut, usually after 25–30 minutes at 350°F (175°C). The middle will still be soft while hot, so don’t wait for it to feel firm in the oven; it sets as it cools.
Why are my bars crumbly or too gooey?
Crumbly bars often come from a crust that wasn’t pressed firmly or from cutting before the slab cooled. Gooey bars may need more cooling time, or the condensed milk and toppings may not have been spread evenly. Chill the fully cooled pan briefly before cutting if the center remains soft.
Can I make the bars ahead?
Yes. Bake them a day ahead, cool completely, and store covered at room temperature or in the refrigerator. Cut just before serving for the neatest edges, or cut and layer with parchment in an airtight container.
Can I use a glass baking dish?
Yes, but glass can heat differently from metal, and bake time may vary. Begin checking at 25 minutes and remove the dish when the edges are golden. Avoid putting a hot glass dish on a cold or wet surface, and let it cool on a dry rack.