Classic Magic Cookie Bars are the ultimate sweet treat, and so easy to make!

Also called 5 or 7 layer bars, depending on the variations, magic bars have been around for decades and it’s no wonder because everyone loves them. This simple recipe bakes chocolate chips, coconut, and chopped pecans in sweetened condensed milk over a buttery, graham cracker crust. The result is a decadent, gooey, hand held dessert treat that is hard to resist, and takes mere minutes to make. Portable and delicious, these Magic Cookie Bars are perfect for potlucks, bbq’s or as a quick grab and go sweet snack.

Magic Cookie Bars in a pile

Follow Our Zesty Life on Pinterest for more great recipes and ideas!

PIN this Magic Cookie Bars recipe to your DESSERTS Board!

Easy Cookie Bars

  • Bar cookies are the easiest because they’re baked in one pan and can be cut into any size. Plus, they’re perfectly portable and can be cut and served right at the party or the potluck.
  • Freeze magic bars and add one to a lunchbox or briefcase for a sweet surprise that will be ready by lunchtime.
  • Always a favorite at the cookie exchange, Magic Cookie Bars can be made in so many ways.  

Magic Cookie Bars ingredients

Magic Cookie Bar Ingredients & Variations

CRUST: Graham cracker crusts make the best base for this recipe. Short on time? Use a pre-made graham cracker pie crust and press it into the bottom of the baking dish. Crushed Nilla or chocolate wafer cookies can be used instead.

TOPPINGS: Chocolate chips, coconut, and pecans are the basics to get a perfectly chewy bar. Any combination of candy chips like butterscotch, white chocolate, or peanut butter will work. Chopped peanuts, walnuts, almonds, or dried fruit like cherries, cranberries, or mango will add a little color and chewy flavor.

process of adding ingredients together to make Magic Cookie Bars

How to Make Magic Cookie Bars

Ask a mini-chef to help you make magic cookie bars!

  1. Press graham cracker mixture into a pan.
  2. Pour sweetened condensed milk evenly over the top of the crust.
  3. Sprinkle chocolate chips, coconut, and pecans over the top.
  4. Bake as per the recipe below

close up of baked Magic Cookie Bars in the pan

Tips & Tricks

  • Line the casserole dish with parchment paper that overhangs on the horizontal sides so the entire dessert is easy to lift out. Place on a cutting board and cut into desired sizes. This also makes cleanup a breeze!
  • Melt the butter directly in the casserole dish while the oven is preheating.
  • Cool magic cookie bars completely before cutting so they stay firm.
  • Store them in a sealed container at room temperature or in the refrigerator up to a week. Or freeze portions and add to a zip top bag with the date written on the outside for up to 4 weeks.
  • Lightly toast coconut and pecans in a dry saute pan to make them extra crunchy and flavorful!
  • Save time and use pre-chopped nuts.

close up of a slice of Magic Cookie Bars

Other Tasty Dessert Bars!

Magic Cookie Bars in a pile
5 from 40 votes↑ Click stars to rate now!
Or to leave a comment, click here!

Magic Cookie Bars

Share these easy Magic Cookie Bars at the next potluck, party or BBQ. They make a sweet, portable hand-held treat that is gooey and delicious.
Prep Time 15 minutes
Cook Time 25 minutes
Cooling Time 1 hour
Total Time 1 hour 40 minutes
Servings 24 -36 servings
Author Candace



  • Preheat oven to 350°F*. Line baking pan with parchment paper (or foil) if desired**. (If using foil, spray with oil or non-stick spray.)
  • Add butter to a 9×13 baking pan and pop into the oven to melt butter. If using parchment paper, add butter to a medium bowl and melt in the microwave on high for 90 seconds.
  • Add crumbs to the pan (or bowl) and mix with butter. Press evenly on the bottom of the pan (using bottom of a measuring cup or other flat surface).
  • Evenly pour the sweetened condensed milk over the crust. Sprinkle with chocolate chips, coconut, then nuts. Press down firmly using a measuring cup or spoon.
  • Bake for 25-30 minutes, or until lightly browned. Remove pan from the oven and run a knife around the edge of the pan (if not lined). Cool completely before cutting.


  • *Preheat to 325°F if using a glass dish.
  • **Lining the pan with parchment paper allows for easy removal and cutting the squares. This is an optional step.
  • Store bars for 1 week in a sealed container in the refrigerator or at room temperature.
  • For 7 layer Magic Cookie Bars add 1 cup butterscotch chips. 
5 from 40 votes↑ Click stars to rate now!
Or to leave a comment, click here!

Nutrition Information

Calories: 129 | Carbohydrates: 13g | Protein: 2g | Fat: 8g | Saturated Fat: 4g | Polyunsaturated Fat: 1g | Monounsaturated Fat: 2g | Trans Fat: 1g | Cholesterol: 11mg | Sodium: 64mg | Potassium: 71mg | Fiber: 1g | Sugar: 10g | Vitamin A: 121IU | Vitamin C: 1mg | Calcium: 43mg | Iron: 1mg

Nutrition information does not include optional ingredients or garnish and is an estimate. It may change based on actual ingredients and cooking methods used.

Course Dessert
Cuisine American

Like our recipes?
Follow us on Pinterest!

Follow us on Pinterest

REPIN this Magic Cookie Bars recipe!

close up of Magic Cookie Bars with a title
top view of Magic Cookie Bars pieces with writing

Magic Cookie Bars pieces on a cutting board with writing

close up of Magic Cookie Bars pieces in a pile with writing

Magic Cookie Bars on a cutting board and in a stack with writing

Magic Cookie Bars on the cutting board with a title


, ,

Recipes you'll love

About the author

I am a wife, mother of two, and professional accountant. I love fantastic food, and it is so often the center of our lives, from everyday dinner, to family gatherings, and special evenings at fabulous restaurants. I have always loved cooking and baking, with my mom and grandma, and now, with my daughter and son. I love trying new recipes while enjoying my favorites too. I’m so happy to share them with you.
See more posts by Candace

latest & greatest

Leave a Reply

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

Recipe Rating


  1. 5 stars
    I made magic bars with a pre made toll house chocolate chip cookie dough, for the crust. WoW! they were yummy and not crumb left. Everyone loved them.

  2. I recall making these by just melted butter on the bottom of the pan/ cookie sheet then Graham crackers on top then layering all the toppings, with coconut last and drizzling the sweetened condensed milk evenly on top then baking… but can’t find the recipe. Turned out fine. Just going to go for it again.

    1. You can click Jump to Recipe at the top or scroll down to see the recipe. Perhaps you are using reader view. The recipe will not show correctly using reader view.

  3. I still have a very old label from the sweetened condensed milk can from long ago! I made these once again last week for a special occasion, and was most certainly not disappointed!