These Magic Cookie Bars are sweet, chewy layers of buttery graham cracker crust, sweetened condensed milk, coconut, dark chocolate chips and pecans.  They come together in about 10 minutes and the recipe includes a gluten-free option!

Magic cookie bars cut into squares.

I grew up baking in the kitchen with my mom for the holidays every year.  We would bake quick breads, cookies and candies during the entire month of December, then my mom would freeze everything so that she could give them away as gifts to family and friends on Christmas Day.

I loved everything that we made, but her Magic Cookie Bars were at the top of my list.  No other treat takes me back to my childhood like these bars do.

I always include these magic bars in my Christmas cookie box, and my friends and family have grown to love them just as much as I do.

I love that they’re so quick and easy that I can whip them up last minute for holidays or any occasion. 🙂

Seven layer bars in a baking dish cut into squares.

Why you’ll love this recipe:

  • Chewy and delicious. Magic bars, also known as seven layer bars, are addictively sweet and chewy, with delicious layers of buttery graham cracker, sweetened condensed milk, coconut, chocolate chips and pecans.
  • Quick and easy. This recipe is almost effortless! and it comes together in just minutes.
  • Customizable. You can customize these bars with butterscotch, white chocolate or peanut butter chips, your favorite candies, nuts and dried fruit.
  • Gluten-free option. For gluten-free magic cookie bars, use gluten free graham crackers or cookies for the crust.

Recipe ingredients

This magic bar recipe only contains 6 ingredients, and it may be customized with your favorite add-in’s as outlined in the ingredient notes below.

Magic bars recipe ingredients

Ingredient notes

  • Graham cracker crumbs (regular or gluten-free). Use traditional graham cracker crumbs, or your favorite gluten-free brand. I’ve successfully used (1) 7.5 ounce package of Pamela’s gluten-free graham crackers, which I processed in my food processor.
  • Butter. I recommend using unsalted butter as I’ve added 1/4 teaspoon salt to the graham cracker crust to offset the sweetness. If you use salted butter, be sure to omit the added salt.
  • Sweetened condensed milk. You’ll need a 14 ounce can of sweetened condensed milk. The condensed milk acts as a binder to hold everything together and is responsible for the gooey, chewy texture. Some magic bar recipes include pouring the condensed milk over the top of the coconut, chocolate chips and nuts, but I prefer to sprinkle the toppings over the milk so that the coconut and pecans get nice and toasty.
  • Unsweetened coconut flakes. I prefer to use unsweetened coconut flakes because there are no preservatives and or added sugar. Sub with your favorite brand of coconut.
  • Dark chocolate chips. Sub some or all of the dark chocolate chips with butterscotch, white chocolate or peanut butter chips. Mini M&M’s work great too!
  • Pecans. Sub with almonds, walnuts, or omit entirely as desired.
  • Flaky sea salt, for sprinkling (optional). A bit of flaky sea salt offsets the sweet flavor of the condensed milk and accentuates the dark chocolate flavor. It’s completely optional!

How to make magic bars

I assume magic bars got their name because they’re so incredibly easy to make. They only take 10 minutes of prep, and they bake up in just 25 minutes.

They’re sheer magic!

Pro tip: Be sure to line the baking dish with parchment or foil to prevent sticking!

See the recipe card below for full instructions.

How to make magic bars
  1. Mix melted butter and graham cracker crumbs together until combined.
  2. Press the graham cracker crumbs evenly into a parchment lined baking dish.
  3. Pour sweetened condensed milk evenly over the graham cracker crust.
  4. Sprinkle coconut, chocolate chips and pecans over the top, then press the mixture down into the milk with a fork. Bake for 25 minutes until light golden brown.

Recipe FAQs

Why are they called magic cookie bars?

Magic cookie bars no doubt got their name because they bake up into magical chewy, delicious layers with just a few simple ingredients and little to no effort.

Can I used evaporated milk instead of sweetened condensed milk?

Do not substitute evaporated milk for sweetened condensed milk in this magic bars recipe. Evaporated milk does not contain any sugar, and it is much thinner than sweetened condensed milk.

Can I make this recipe in advance?

It’s a great idea to make magic bars in advance as it takes a few hours for them to set. Prepare them up to a day in advance so that they’re easier to cut and serve.

Do magic cookie bars need to be refrigerated?

They generally don’t require refrigeration, however, if the weather (and your kitchen) is very warm, you may want to consider refrigerating the bars in an air tight container.

Can I omit the coconut?

If you’re not a fan, you can certainly make magic cookie bars without coconut.

Recipe variations

There are so many delicious magic bar variations. See some great ideas below!

  • Swap some or all of the dark chocolate chips for butterscotch chips, peanut butter, white chocolate or milk chocolate chips.
  • Add candies such as mini M&M’s, caramels or toffee bits. Holiday candies or sprinkles are great as well!
  • Chopped pretzels add great salty flavor and crunch.
  • Not a fan of coconut? Omit it to make magic cookie bars without coconut.
  • Use your favorite nuts such as almonds or walnuts, or omit them entirely for a nut-free option.
  • Add fresh raspberries for flavor and a pop of color. Dried cranberries are a great option as well.
  • Swap out the graham crackers with vanilla cookies, chocolate cookies, or even Oreos for a fun twist.
  • If you follow a vegan diet, be sure to check out these vegan magic bars by Love in My Oven.

Recipe notes

  • Pro tip: Be sure to line the baking dish with parchment or foil to prevent sticking!
  • *I used one 7.5 ounce package of Pamela’s gluten free graham crackers for this recipe and processed them in my food processor. Any type of gluten free crackers or cookies will work well for these magic bars.
  • Substitute the dark chocolate chips with your favorite variety or a combination. Butterscotch, peanut butter or white chocolate chips are all great options!
  • Swap out the pecans with your favorite nuts or omit altogether. Chopped dried fruit is also a great option.
  • Store magic bars in an air tight container at room temperature for 3-5 days or freeze for up to 3 months.
Seven layer magic cookie bars on parchment paper.

Did you try this recipe?  If so, be sure to leave a review below and tag me @flavorthemoments on Facebook and Instagram

Save This Recipe
I’ll send it to your inbox right away!
Please enable JavaScript in your browser to complete this form.
Your privacy
Magic cookie bars cut into squares.

Magic Cookie Bars

Magic Cookie Bars are sweet, chewy layers of buttery graham cracker crust, sweetened condensed milk, coconut, dark chocolate chips and pecans.  This magic bar recipe may be made traditionally or gluten free!
2
reviews

Leave a Review »

Ingredients

  • 1 stick unsalted butter melted
  • 1 1/2 cups gluten free or regular graham cracker crumbs*
  • 1/4 teaspoon sea salt omit the salt if using salted butter
  • 14 ounces sweetened condensed milk
  • 1 cup unsweetened coconut flakes
  • 1 cup dark chocolate chips
  • 1/2 cup pecan pieces
  • Flaky sea salt for sprinkling (optional)

Instructions 

  • Preheat the oven to 350 degrees. Line a 13 x 9" baking dish with parchment paper or foil.
  • Melt the butter in the microwave in a medium sized heat proof bowl. Add the graham cracker crumbs and 1/4 teaspoon sea salt and stir until the graham cracker crumbs are well coated.
    1 stick unsalted butter, 1 1/2 cups gluten free or regular graham cracker crumbs*, 1/4 teaspoon sea salt
  • Press the graham cracker crumbs evenly into the bottom of the baking dish.
  • Pour the sweetened condensed milk evenly over the graham cracker crumbs, followed by the coconut, dark chocolate chips, and pecans. Press the mixture down across the entire top of the bars with a fork, then bake for 25 minutes or until lightly golden brown.
    14 ounces sweetened condensed milk, 1 cup unsweetened coconut flakes, 1 cup dark chocolate chips, 1/2 cup pecan pieces, Flaky sea salt
  • Cool completely on a wire rack, then cut into bars. Serve and enjoy!

Notes

  • Pro tip: Be sure to line the baking dish with parchment or foil to prevent sticking!
  • *I used one 7.5 ounce package of Pamela’s gluten free graham crackers for this recipe and processed them in my food processor. Any type of gluten free crackers or cookies will work well for these magic cookie bars.
  • Substitute the dark chocolate chips with your favorite variety or a combination. Butterscotch, peanut butter or white chocolate chips are all great options!
  • Swap out the pecans with your favorite nuts or omit altogether. Chopped dried fruit is also a great option.
  • Store magic bars in an air tight container at room temperature for 3-5 days or freeze for up to 3 months.

Nutrition

Serving: 1bar, Calories: 302kcal, Carbohydrates: 29g, Protein: 4g, Fat: 19g, Saturated Fat: 12g, Cholesterol: 25mg, Sodium: 143mg, Potassium: 235mg, Fiber: 2g, Sugar: 21g, Vitamin A: 259IU, Vitamin C: 1mg, Calcium: 124mg, Iron: 1mg

Nutrition is estimated using a food database and is only intended to be used as a guideline for informational purposes.

Did you try this recipe?Be sure to tag @flavorthemoments with the hashtag #flavorthemoments on Instagram so I can see what you made!

**This post was originally published on December 2019. Step by step photos have been added and the text has been modified to include more recipe information.

Sharing is caring!