7-Layer Magic Bars

These bars are so rich and sweet, you can cut them into 24 small bars and still feel satisfied.

I like to add a sprinkle of flaky Maldon salt on top to add some crunch and help cut the sweet richness. The salt is totally non-traditional, though, so omit if you want that nostalgic, ultra-sweet Magic Bar experience.

  • Prep time: 5 minutes
  • Cook time: 30 minutes
  • Yield: 24 bars


  • 2 cups (225 g) graham cracker crumbs
  • 1/2 cup (115 g / 1 stick) melted unsalted butter
  • 14 ounces (396 g / 1 can) sweetened condensed milk
  • 1 cup (185 g) semi-sweet chocolate chips
  • 1 cup (185 g) butterscotch chips
  • 1 cup (115 g) chopped pecans
  • 1 cup (105 g) shredded sweetened coconut
  • 1 teaspoon flaky sea salt (like Maldon), optional


1 Preheat oven to 350F. Spray a 9 x 13-inch baking pan with cooking oil then line it with parchment paper.

2 Make the graham cracker crust: Place the graham cracker crumbs and the melted butter in a bowl. Toss with a fork until the crumbs are moist and hold together when squeezed with your hand.

Dump the crumbs in the middle of the pan and then press them into an even layer with your fingers or the back of a flat-bottomed cup.

Magic Bars Magic Bars

3 Pour the sweetened condensed milk over the graham cracker crust. Spread to edges of the pan with a spatula.

Magic Bars

4 Layer on the rest of the toppings: In this order, sprinkle the chocolate chips, butterscotch chips, pecans, and then sweetened coconut over the top of the condensed milk.

Gently press the ingredients down with your palm so they stick to the condensed milk.

Magic Bars

5 Bake in the oven for 30 to 35 minutes. Bake until the edges of the bars turn golden-brown and start to pull away slightly from the sides of the pan. Remove from the oven and sprinkle with the sea salt (if using).

Magic Bars

6 Cool completely before lifting the bars out of the pan using the parchment paper. Cut into 24 pieces and store in an airtight container with wax paper or parchment paper between layers. The flavor of the bars is even better the day after baking. Bars stored at room temperature will be fairly soft and are best eaten within 3 to 5 days. For firm and chewy bars, store in the fridge for up to a week.

Click on the comments you'd like to print with your recipe. Grayed out comments will not print.


  • Karen

    Love it. My sister for years would not try them but she finally did and is absolutely in love with them. I’ve eaten them for ever and love them. They are so easy to make just a little costly for all the needed ingredients but well worth it.


  • Heather Vargas

    I followed the recipe as written and the bottom was a bit too gooey. Any suggestions on how to fix this? Should I use less than the whole can of sweetened condensed milk? The flavor was fantastic so I would love some help getting the texture right.

  • Polly

    This recipe is fabulous! I do not have a 9 x13 pan, so I increased all the amounts by 20% and made it in a 10 x 15 cookie sheet. Got 48 good-sized triangles. Perfect!


  • Kerry

    I *LOVE* Irvin and Eat the Love (easily one of the best written food blogs). My grandmother used to make these for us when I was a kid. So now I love Irvin even more for reminding me. I may even have all of the ingredients in the house! :)

    Just read through the comments and reread the post – ours were layered in a different order. Crust, coconut, chocolate and then butterscotch chips, pecans and topped with (as another reader wrote) the sweetened condensed milk. The chips melt into the coconut a bit and the covers and seeps in the crags to hold it all together.

  • MJ

    Do these freeze well?

    • Emma Christensen

      Hi, MJ! Emma here, managing editor. My instinct is that, yes, these would freeze well. Wrap the bars tightly in a few layers of plastic wrap and then store in a freezer bag or other container. Allow to thaw on the counter for a few hours before serving. Enjoy!

      • Kerry

        Yes – as noted in my comment, my grandma used to make these for us. When I was lucky enough to get a ‘care package’ in college, I’d freeze them and sneak them one at a time when I really needed a taste of home. :)

  • Diane

    I just made three batches for twenty or so hungry college students. My husband teaches an evening class, so each week I make goodies (different each week) for him to have out for his students. If there are any left over (usually there are a few) they will be his treat until they are gone. Thanks for the great idea!

  • Ann

    My sister in law came up with this idea. Instead of using graham cracker crumbs she uses a small bag of crushed Pecan Sandies cookies for the base. It makes them so much better.

  • m j b

    I am lactose tolerence. What can I use to substitute the can of condensed milk?

    • Irvin Lin

      So the condensed milk is really important to this recipe. It binds everything together and I have never used anything else for these, so I can’t make any personal recommendations.

      That said, I do know that there is a commercially made non-dairy sweetened condensed coconut milk made my “Let’s Do Organic”. It might be hard to find but it theoretically should work. But again, I have never used it so I can’t tell you how the final product will turn out or taste.

      Also, there are numerous non-dairy condensed milk recipes out here on the web. A quick google search for “non dairy condensed milk” comes up with recipes for coconut condensed milk, cashew condensed milk, soy condensed milk, etc. I can’t necessarily suggest one recipe or another specifically because I haven’t tested any of them.

      But if you do make your own non-dairy condensed milk substitute or use the canned sweetened condensed coconut milk, please come back and let us know how it turned out!I’m very curious!

      • Willow

        Here is a suggestion: 2 eggs, 1 c brown sugar, and 2 T flour to substitute for a can of condensed milk

    • Maria

      I just saw this recipe using puréed bananas (I haven’t tried it though): https://www.feastingonfruit.com/chocolate-peanut-butter-magic-bars/

  • Rena

    I’ve never had these but will try a recipe for the grandchildren who are visiting for the summer. Sounds yummy.

  • Patricia

    I have made these for over 50 years, but was taught to mix it verything together, then stir in sweetened condensed milk and some vanilla (no butter). Then press the mixture into a parchment-lined sheet pan. This version eliminates the ooey gooey overly sweetness of the condensed milk, because it’s mixed in. Try it! Also prefer using walnuts. Cut bars while still warm and store when cool wrapped in foil. Make day ahead for best flavor.

    • Helen Welch

      This was a bad suggestion…it ruined the recipe. I should have stuck with the original recipe. Ugh!

  • Janice in Vermont

    I grew up eating these (in the 50s, in New England, where they were also called Magic Bars, at least by my mom. She used walnuts instead of pecans, though. So I suspect they are not a pure Midwestern treat as much as a pure American treat brought to us by the brave new world of advertising and convenience foods, and the longstanding tradition of church potlucks. But I still love them!

    • Barbara

      Hi Janice, I also grew up in New England, but in the 70s, and we also called them Magic Bars. My neighbor first made them, then my mom, and we usually had them at Christmas time. My mom would have them with her morning coffee if there were any leftover. They are so magical!

  • Sarita

    In my family’s recipe, we mix the graham cracker crumbs with the coconut for the crust, omit the butterscotch chips, and drizzle the SCM over the whole thing instead of making it a layer – though I want to try that to see how it comes out. They are a summer cookout treat, I actually can’t imagine eating them in winter even though there’s not necessarily anything seasonal about them!

  • Linda

    Instead of the chocolate and butterscotch chips, I use a 6 ounce bag of dried apricots, chopped up into teeny, tiny pieces and a 6 ounce bag of white chocolate chips. These don’t last long in the office, no matter how I make them!

  • mary

    We are from the midwest also, but I have never used butterscotch chips. BeEnjoy making these for 40 yrs, husband’s favorite.

  • Maxie

    Can the condensed milk be substituted for something non-dairy?

    • Irvin Lin

      I’ve only made them with condensed milk but there are numerous recipes out there for making non-dairy condensed milk substitutes. Just google “non dairy substitute for condensed sweetened milk” and find one suitable for your dietary needs. If you do make them with a non-dairy substitute, please report back! I’d love to hear your feedback.

    • Willow

      I tried using this egg substitute: 2 eggs, 1 c brown sugar, and 2 tblspn flour. I tried it because I love these bar cookies but wanted something less aggressively sugary. I loved it. It has a thick texture like condensed milk and added the right amount of sweetness for my taste.

  • Deb in Indiana

    Such a great idea to post this — we forget about the oldies but goodies after a while.

    These are so good — put out a plate of these and a plate of almost any other cookie and these will disappear first!

    These are a great recipe for making with kids, because it’s foolproof, quick, and easy.

    Among the many random ingredients that may be added are marshmallows, for the s’mores lovers or broken pretzels for the salt lovers.

  • Olga

    What is the best way to store them? If I make them the night before for an event, will they still be as good the next day? Thanks! These look fantastic! I love condensed milk!

    • Irvin Lin

      They store best in the fridge, in an airtight container. I would layer the bars between parchment or wax paper. You can serve them cold (they are more chewy) or you can bring the to room temperature by leaving them out on the counter for an hour ahead of serving. But you can keep them at room temperature too if you want. They definitely will be good the next day! Some actually like them after a day or two of sitting around.

  • lindsay e

    These were what we left out for Santa when I was a little kid. My mom puts in whatever random baking odds and ends she has laying around. They’re great with pecans, with or without coconut, and I love them with Heath toffee bits.

  • EK

    We called them Magic Cookie Bars – my mom made them with walnuts and I hated them only because of that. I’ll try it with a different nut, thanks for reminding me of them!

  • Keli Moffat

    My grandma always made these. They were a staple at every family function! And I can’t eat these without thinking of her with her powder soft wrinkles, old lady heels, and pink peppermint laden purse. Think I may have to go home and make some and restart the tradition.

  • MontanaHappy.com

    I just love these. It brings back very happy memories. If you haven’t tried them…run …don’t walk to the grocery store and make some! :)

  • Mary // chattavore

    These are one of my favorites! They’re so simple and delicious. These look great!

  • Bebe

    Inez, coconut is not a favorite of mine either, but I can’t imagine these bars without it. It is the combination of tastes that makes the bars so good.

    Nadia, the condensed milk is sweetened. Unsweetened coconut would probably work. The addition of sugar would not make any difference in this recipe which is just a number of layered ingredients rather than a mixture.. Someone else may disagree…

  • Bebe

    My recipe calls for pouring the milk on last. Drizzling it would be a more apt description as it is really thick. But somehow it runs together and amalgamates this whole delicious confection. It is more confection than cookie, so can be cut in small pieces for serving. Larger ones are for the baker, best eaten while standing over the sink. :-)

    My recipe also calls for flaked rather than shredded coconut. The texture of the shredded variety is offputting to some, so… As for nuts, chopped walnuts also work.

  • [email protected]

    We do not get sweetened coconut here, would you suggest I add sugar or will it be sweet enough as is?

    • Irvin Lin

      These bars are pretty sweet on their own because of the condensed milk so if you can’t find sweetened coconut, you can definitely just use unsweetened shredded coconut. I wouldn’t bother adding any sugar at all.

  • Inez

    I am not a fan of coconut. Will this work without it?

  • Kate McDermott

    I think everyone’s mom made these. Mine called these “Hello Dollies” and made them with slivered almonds instead of pecans. Her’s were like candy…so sweet and rich.

  • Natalie

    I used to make these for a bakery/cafe I worked for. We called them Millionaire Bars and finished with the milk rather than pressing the other items into the milk. Either way, delicious, easy, and they last a LONG TIME, too!