Magic Cookie Bars Recipe

Magic Cookie Bars

The Spruce Eats / Morgan Baker

Prep: 15 mins
Cook: 32 mins
Cool: 15 mins
Total: 62 mins
Servings: 12 to 24 servings
Yield: 12 to 24 bars
Nutrition Facts (per serving)
321 Calories
21g Fat
30g Carbs
4g Protein
Show Full Nutrition Label Hide Full Nutrition Label
Nutrition Facts
Servings: 12 to 24
Amount per serving
Calories 321
% Daily Value*
Total Fat 21g 27%
Saturated Fat 12g 61%
Cholesterol 19mg 6%
Sodium 249mg 11%
Total Carbohydrate 30g 11%
Dietary Fiber 3g 9%
Total Sugars 25g
Protein 4g
Vitamin C 1mg 4%
Calcium 85mg 7%
Iron 2mg 9%
Potassium 223mg 5%
*The % Daily Value (DV) tells you how much a nutrient in a food serving contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.
(Nutrition information is calculated using an ingredient database and should be considered an estimate.)

These deliciously sweet and indulgent bars come by many names; magic bars, hello Dolly bars, cookie bars, seven-layer bars, the list goes on and on. Whatever you choose to call them doesn’t matter much, so long as you make them and enjoy them. The magic in these bars comes from each distinct layer melding together to form one rich, creamy, crunchy dream dessert. The butterscotch and chocolate swirl to form a caramelly flavor while the coconut provides a crunchy and aromatic addition, and the graham cracker crust creates the perfect plate for all the remaining layers.

In addition to being delectable, these bars are so simple to make and can be customized any way you like where size or shape is concerned. For instance, you could purchase individual tart tins and make small one-person size magic bars that would be the perfect addition to your holiday cookie gift box or to bring to the annual cookie swap. These cookie bars are indeed sweet and quite rich, but you can cut them into small squares to feed a large crowd. Because there is a large amount of chocolate and butterscotch, you can make these ahead of the party, cool, and cut them, then store them in an airtight container with no fear of them drying out or going stale quickly.

However you decide to enjoy these bars is up to you and sure to be memorable.  

"I loved how easy and straightforward this recipe was. Once you gather your ingredients, these take no time to whip up. I love the addition of butterscotch chips and coconut for sweetness, along with the bittersweet chocolate. Your whole family will love these sweet treats!" – Tracy Wilk

magic cookie bars/Tester Image
A Note From Our Recipe Tester


  • 8 tablespoons (1/2 cup) unsalted butter, melted and slightly cooled, more for the pan

  • 24 graham crackers

  • 2 tablespoons packed light brown sugar

  • 1 (14-ounce) can sweetened condensed milk

  • 10 ounces finely chopped dark chocolate, divided

  • 1 cup butterscotch chips, divided

  • 1 1/4 cups coarsely chopped pecans, divided

  • 2 cups unsweetened coconut flakes

  • 2 teaspoons flaky sea salt, such as Maldon, for garnish

Steps to Make It

  1. Gather the ingredients.

  2. Position a rack in the center of the oven and heat to 350 F. Line a 13x9 inch baking dish with parchment paper so the parchment hangs over on the two longest sides. Generously grease with butter.

  3. Use a food processor to grind the graham cracker into a semi-fine meal.

  4. Add the brown sugar and pulse several times to incorporate.

  5. With the processor running, slowly add the 1/2 cup butter until well combined.

  6. Add the graham cracker mixture to the prepared pan, pressing firmly to create an even crust on the bottom.

  7. Pour the sweetened condensed milk over the crust and smooth in an even layer with a silicone spatula.

  8. Sprinkle half of the chopped chocolate, half of the butterscotch chips, and half the pecans evenly over the condensed milk.

  9. Sprinkle the coconut flakes over the mixture in an even layer.

  10. Sprinkle the remaining chocolate, butterscotch, and nuts evenly over the coconut.

  11. Sprinkle the flaky sea salt evenly over the mixture.

  12. Bake for 28 to 32 minutes, or until the toppings are slightly golden brown.

  13. Remove from the oven and cool on a wire rack, about 15 minutes.

  14. Use the excess parchment to lift the bars from the baking dish. Cut into equal size pieces, 12 to 24 bars, depending upon preference, and serve.


When cutting the bars, you’ll need to have paper towels or a clean kitchen towel nearby. Be sure to wipe the knife of any chocolate or bits from the bars before each cut, this will lead to clean, appealing squares.

Recipe Variations

  • If graham cracker crust isn’t your favorite way to enjoy these cookie bars, try using a pretzel crust or chocolate sandwich cookie crust for extra chocolaty goodness.
  • You could use macadamia nuts, toasted hazelnuts, or granola instead of pecans.
  • Or something like dried cranberries or blueberries could be a delicious addition if you like mixing chocolate and tart fruits.

How to Store and Reheat

These magic cookie bars can be expected to stay fresh for at least five days, likely more.

Although not recommended, you can freeze these cookie bars and reheat them in the microwave for about 15 to 20 seconds to bring them back to life. Just be careful not to burn the chocolate when re-heating using the microwave. Alternatively, you can place them frozen in a 350 F oven for about 4 minutes.