Magic Cookie Bars

from 1 votes

The classic Magic Cookie Bars you grew up with, made with a buttery graham cracker crust, sweetened condensed milk, coconut, chocolate, butterscotch and nuts. Chewy, gooey and rich, they’re always the first dessert to disappear from any party. You may know them as Seven Layer Bars or Hello Dolly Bars!

Magic cookie bars stacked five high on a piece of parchment paper.

A Chewy, Gooey Vintage Favorite

Whether you call them magic cookie bars, 7-layer bars, coconut dream bars or even Hello Dolly bars, one thing’s for sure: these are the first dessert to disappear from any holiday table, potluck or bake sale. Sweet, nostalgic, and totally crowd-pleasing, these rich and chewy bars hit every mark.

If you’ve somehow never had a magic cookie bar (how is that even possible?!), let me introduce you to one of my favorite childhood desserts. A buttery graham cracker crust topped with sweetened condensed milk and layers of shredded coconut, chocolate and butterscotch chips, and chopped pecans.

These retro dessert bars first became popular in the 1960s, thanks in part to their debut on the back of Eagle Brand sweetened condensed milk cans. And now they’re a tradition in my own kitchen, too. Because some recipes are too good (and too easy) not to pass down.

Ingredients

Glass bowls containing ingredients to make magic cookie bars, including crushed graham crackers, melted butter, butterscotch chips, sweetened condensed milk, flaked coconut, chopped pecans and semisweet chocolate chips.
  • Graham crackers: You’ll need about 20 whole graham cracker sheets to get roughly 2½ cups of finely crushed crumbs. Just like when making a graham cracker crust, aim for fine crumbs that resemble sand, not big chunks, so the crust holds together.
  • Butter: I prefer to use unsalted, but salted is perfectly fine, too. You’ll melt it and mix it with the graham cracker crumbs to form the crust.
  • Sweetened condensed milk: The magic in magic bars! It acts as both the glue and the caramel-like sweetness that ties everything together. Just don’t confuse it with evaporated milk—they look similar but behave very differently (save that one for pumpkin pie!).
  • Shredded coconut: You can use sweetened or unsweetened flaked coconut in this recipe; I prefer unsweetened because I think the bars are sweet enough with all the other ingredients and I like the texture that unsweetened coconut has after being baked.
  • Semisweet chocolate chips and butterscotch chips: A classic duo for this dessert. You can mix it up with peanut butter chips, white chocolate or even dark chocolate chunks for a twist.
  • Pecans: Coarsely chopped pecans add just the right amount of crunch and nuttiness. Walnuts work, too!

See the recipe card for full information on ingredients and quantities.

Allergy Note: The original magic bar recipe from Eagle Brand calls for chopped nuts, but if you want to make these nut-free, swap in crushed pretzels instead. They add a salty crunch that balances all that gooey sweetness.

Magic cookie bars cut into squares on a wooden cutting board.

Note from the Test Kitchen

Just like the original recipe, my mom always poured the sweetened condensed milk directly over the graham cracker crust before layering on the toppings. But over the years, I’ve met plenty of bakers who swear by pouring it on last. So when I decided to put this recipe through the full Just a Taste test, I tried it both ways.

My conclusion? A hybrid approach wins. I like to pour most of the sweetened condensed milk over the crust, then reserve a little for the top. That final drizzle keeps the coconut moist and helps prevent it from browning too quickly (especially if you’re using unsweetened).

And one more pro tip: microwave the sweetened condensed milk for 15 seconds. It makes it MUCH easier to pour and spread.

  1. Prep your pan. Line a 9×13-inch baking pan with parchment so it hangs over the long sides. That overhang will make lifting and slicing a breeze later. I like to secure the parchment with all-metal clips to keep it in place.

Kelly’s Tip: Spray the pan lightly with cooking spray before laying down the parchment. It’ll act like glue so the paper doesn’t shift while you add the crust. No need to grease the parchment itself, as the butter in the crust acts as a natural release from the paper.

  1. Make the graham cracker crust. Combine the finely crushed graham crackers and melted butter until evenly moistened—you’re aiming for a texture that looks like damp sand. Use your fingers to press the mixture into the pan with medium-firm pressure until the crumbs stop shifting around. Then, use the flat bottom of a measuring cup or drinking glass to gently smooth and even out the surface.

  1. Add the layers. Pour most of the warmed sweetened condensed milk over the crust and spread it evenly to the edges. Then sprinkle on the coconut, chocolate chips, butterscotch chips and nuts. Drizzle the reserved condensed milk over the top.

  1. Bake and cool. Bake at 350°F for about 25 minutes, or until the top is golden and the edges look slightly toasted.

Remove from the oven and let the bars cool completely in the pan before slicing. Once cool, lift the bars out using the parchment overhang, slice into squares and try to eat just one!

Tried-and-Tested Tips for Success

  • It’s tempting to really pack the graham cracker crust down, but go easy! Press just firmly enough that it holds its shape. Over-packing can lead to a dense, tough crust that’s hard to slice through later.
  • Warm the sweetened condensed milk. A quick 10–15 seconds in the microwave makes it pourable and spreads evenly without tearing up the crust underneath.
  • If your oven runs hot or you’re using sweetened coconut, check the bars around the 20-minute mark to make sure the top isn’t browning too fast. If it is, tent loosely with foil for the final few minutes.
  • It’s very important to cool completely in the pan! I know, it’s hard to wait, but cooling the bars in the pan is what gives you neat, clean edges and that signature chewy-meets-gooey texture. Cutting too soon leads to a melty mess.
  • Why most “gooey middles” happen: If the center of your bars falls apart when sliced, chances are the sweetened condensed milk hasn’t caramelized enough or the bars weren’t fully cooled.

Storage and Freezing Instructions

Once your magic cookie bars are completely cool, cover the pan tightly with plastic wrap or transfer the sliced bars to an airtight container. They’ll keep at room temperature for up to a few days, or in the fridge for up to one week.

Magic cookie bars freeze like a dream, too! Wrap them tightly in a layer of plastic wrap and aluminum foil and freeze for up to 3 months. Thaw overnight in the refrigerator.

Pro Tip: Always cool the bars completely before freezing. If you freeze while warm or with the pan still hot, condensation can soften the texture.

A tall stack of magic cookie bars made with a graham cracker crust, flaked coconut, butterscotch chips, chocolate chips and chopped pecans.
Craving more? Subscribe to Just a Taste to get new recipes, meal plans and a newsletter delivered straight to your inbox! And stay in touch on Facebook, TikTok, Pinterest and Instagram for all of the latest updates.
Dessert
These easy Magic Cookie Bars (a.k.a. 7-Layer Bars or Hello Dolly Bars!) feature a buttery graham cracker crust topped with sweetened condensed milk, coconut, chocolate, butterscotch and nuts. They’re chewy, gooey and the first dessert to disappear from any party!
Author: Kelly Senyei
5 from 1 vote
Magic cookie bars stacked five high on a piece of parchment paper.
Prep Time 10 minutes
Cook Time 25 minutes
Total Time 35 minutes
Servings 24 servings

Ingredients 

  • 2 1/2 cups finely crushed graham crackers (about 20 whole crackers)
  • 1/2 cup unsalted butter, melted 
  • 1 (14-oz.) can sweetened condensed milk
  • 1 1/2 cups flaked coconut (sweetened or unsweetened)
  • 1 1/2 cups semisweet chocolate chips
  • 2/3 cup butterscotch chips 
  • 1 cup chopped pecans or roughly crushed pretzels 

Instructions 

  • Preheat the oven to 350°F. Line a 13×9-inch baking pan with parchment paper so that it hangs over on the two longer sides. 
  • In a medium bowl, stir together the crushed graham crackers and melted butter until well-combined. Add the mixture to the bottom of the baking pan, pressing it into an even layer.
  • Transfer the sweetened condensed milk to a microwave-safe bowl or liquid measuring cup. Microwave it for 15 seconds then pour it atop the graham cracker crust, spreading it into an even layer. 
  • Sprinkle the coconut, chocolate chips, butterscotch cups and pecans in an even layer on top of the sweetened condensed milk.
  • Bake the bars until they are pale golden on top, about 25 minutes, then remove them from the oven and let them cool completely in the pan.
  • Using the parchment paper overhangs, transfer the bars onto a cutting board then slice and serve. 

Kelly’s Notes

  • You can use sweetened or unsweetened flaked coconut in this recipe; I prefer unsweetened because I think the bars are sweet enough with all the other ingredients and I like the texture that unsweetened coconut has after being baked.
  • A trick to get the parchment paper to sit in the pan (and not move) is to first coat the pan all over with cooking spray and then place the parchment on top (so the spray acts like glue); you do NOT need to grease the parchment, as the butter in the crust acts as a natural release from the paper.
  • Reserving a portion of the sweetened condensed milk to add on top of the coconut lends some moisture and helps prevent the coconut from burning too quickly (especially if you’re using unsweetened).
  • Nut-free variation: Replace the chopped nuts with crushed pretzels.
  • To store: Once your magic cookie bars are completely cool, cover the pan tightly with plastic wrap or transfer the sliced bars to an airtight container. They’ll keep at room temperature for up to a few days, or in the fridge for up to one week.
  • To freeze: Always cool the bars completely before freezing. If you freeze while warm or with the pan still hot, condensation can soften the texture. Wrap them tightly in a layer of plastic wrap and aluminum foil and freeze for up to 3 months. Thaw overnight in the refrigerator.
  • ★ Did you make this recipe? Don’t forget to give it a star rating below!

Nutrition

Calories: 277kcal, Carbohydrates: 28g, Protein: 3g, Fat: 17g, Saturated Fat: 9g, Polyunsaturated Fat: 1g, Monounsaturated Fat: 5g, Trans Fat: 0.2g, Cholesterol: 17mg, Sodium: 135mg, Potassium: 190mg, Fiber: 3g, Sugar: 20g, Vitamin A: 175IU, Vitamin C: 1mg, Calcium: 67mg, Iron: 1mg

Did you try this recipe?

Leave a comment below with your star rating!

This post may contain affiliate links.


Join Our Monthly Recipe Challenge!
Ready to make some dough? Cook the featured recipe, submit your photo and enter for your chance to win. Sign up below to get all the details sent straight to your inbox.

Categories

Related Recipes

Check out more crave-worthy favorites

Kelly Senyei holding a copy of The Secret Ingredient Cookbook

love the recipes on just a taste?

Check out my cookbook!

Order your copy of The Secret Ingredient Cookbook featuring 125 brand-new family-friendly recipes with surprisingly tasty twists!

5 from 1 vote

Join the Conversation

Rate and Comment

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

Recipe Rating




Comments

  1. Shelly says:

    5 stars
    Just like my mom used to make! Thanks for reminding me about these bars.

    1. Kelly Senyei says:

      I love a good sentimental recipe!