Magic Cookie Bars Recipe

Magic Cookie Bars Recipe

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

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.

    Magic Cookie Bars ingredients in bowls

    The Spruce Eats / Abbey Littlejohn

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

    Greased and parchment paper lined baking dish

    The Spruce Eats / Abbey Littlejohn

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

    Graham crackers in a food processor

    The Spruce Eats / Abbey Littlejohn

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

    Graham cracker mixture and brown sugar in a food processor

    The Spruce Eats / Abbey Littlejohn

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

    Graham crackers mixture and butter in a food processor

    The Spruce Eats / Abbey Littlejohn

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

    Graham cracker mixture in a prepared baking dish

    The Spruce Eats / Abbey Littlejohn

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

    Graham cracker mixture with sweetened condensed milk on top in a prepared baking dish

    The Spruce Eats / Abbey Littlejohn

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

    Chopped chocolate, butterscotch chips, and pecans in a prepared baking dish

    The Spruce Eats / Abbey Littlejohn

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

    Coconut flakes on top of the chocolate and nut mixture in the prepared baking pan

    The Spruce Eats / Abbey Littlejohn

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

    Chocolate, butterscotch, and nuts on top of the coconut flakes in the prepare baking dish

    The Spruce Eats / Abbey Littlejohn

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

    Salt sprinkled on top of the nuts and chocolate in the prepared baking dish

    The Spruce Eats / Abbey Littlejohn

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

    Baked Magic Cookie Bars in a prepared baking dish

    The Spruce Eats / Abbey Littlejohn

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

    Baked Magic Cookie Bars in a prepared baking dish, on a cooling rack

    The Spruce Eats / Abbey Littlejohn

  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.

    Magic Cookie Bars on a plate

    The Spruce Eats / Abbey Littlejohn


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.


No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *