This post may contain affiliate links. Please read our disclosure policy.

These chewy, decadent 7 Layer Bars are an endlessly customizable layered dessert with chocolate chips, coconut, chopped nuts and rich sweetened condensed milk, all in a simple graham cracker crust.

7 layer bars on dark gray serving plate in stack
Want to save this recipe?
Enter your email and weโ€™ll send it to you! Plus, get new recipes every week.
Please enable JavaScript in your browser to complete this form.

Why you'll love this 7 layer bars recipe

These are the easiest bars ever, and they are always a major hit everywhere you take them. They are relatively high on the allergen-unfriendly scale (dairy! nuts! coconut!), but I've got all kind of ideas for how to substitute different ingredients.

They're satisfyingly chewy, sweet, and have so many different textures all in one decadent dessert bar. You can follow the recipe to the letter, using all the same 7 elements that I do, or stick with the basic concept and make them your own.

Since there are no eggs to act as a binder, they seem like they won't hold together well. But the buttery graham cracker crust, when baked fully, is remarkably stable, and the sweetened condensed milk holds everything together.

They do hold together best when they're stored in the refrigerator, and I think they even taste best that way, too. They are also called 7 layer magic bars for a reason!

Key ingredients in this recipe

Ingredients for 7 layer bars in bowls with pouch of Eagle brand sweetened condensed milk

The 3 basic elements of 7 Layer Bars

There are 3 elements to these bars that make these bars what they are. How you choose to provide those elements is really up to you, though.

To make 7 Layer Bars, also known as Seven Layer Magic Bars, you must have:

1. A crunchy cookie crust. You can use any sort of crushed up crunchy cookie you likeโ€”store-bought, homemade, less sweet, more sweet, chocolate, or vanilla. The sky's the limit. And you have to mix the cookies with some sort of butter or butter substitute.

2. Pieces. The majority of the 7 layers are made up with pieces of chips, nuts, and coconut. If you don't like one sort of piece, substitute it with another. Love butterscotch? Use butterscotch chips. Hate coconut? Replace it with more chocolate chips. You get the idea.

3. Sweetened condensed milk. Yes, it has a ton of sugar, but it holds the bars together, makes them creamy and gives them depth of flavor. You could also probably use dulce de leche instead, and make an even more decadent bar.

You can see pictured above a plastic squeeze bottle of sweetened condensed milk, which makes it so much easier and neater to evenly distribute the product evenly over the top of the other layers of these magic cookie bars.

How to make 7 layer bars

Make the graham cracker crust

The crust is a simple one, made with crushed graham crackers and melted butter. Mix them together, and then press into a lined baking pan.

light brown graham cracker and butter mixture in metal bowl with mixing spoon, and then mixture pressed into square metal baking pan

Layer on all the chips, nuts, and coconut

  • Place each of the 4 pieces layers right on top of the graham cracker crust in order: first semi-sweet chocolate chips, then white chocolate chips, chopped nuts, and finally coconut chips.
  • You can see my coconut chips are toasted in the oven first a bit, but that's really optional.

Add sweetened condensed milk & more chips

  • Using one of those squeeze bottles of sweetened condensed milk makes it so much easier to pour that ingredient on top, but you can also make it work with a can.
  • Just pour slowly first one way, then the other and back again until you've covered it all. Then add a few more pieces on top!
sweetened condensed milk on 7 layer bars with final chips on top

Bake the 7 layer bars & enjoy.

  • Place the baking pan in the center of a 350ยฐF oven and bake until the top of the mixture is bubbling and the edges are beginning brown.
  • They'll also pull away from the pan a bit.
  • Let cool to room temperature, chill for a bit, and then slice with a sharp knife into bars and enjoy!
Overhead image of baked 7 layer bars still in pan

7 Layer Bars ingredients and substitution suggestions

As always, please understand that I haven't tried any of these substitutions unless I specifically state otherwise. There are just my best-educated guesses about what would work in this recipe so that readers with other dietary restrictions can bake along.

If you need to make gluten free 7 layer bars, be sure to use gluten free graham cracker crumbs and carefully select your other ingredients to be sure that they're free of wheat or gluten as a contaminant:

Dairy free 7 layer bars

This will take a bunch of substitutions, but they're pretty straightforward. Use a dairy-free crunchy cookie crumb (you can use my gluten free graham crackers and replace the butter with shortening, and add a touch of milk to bring the cookie dough together), and Earth Balance buttery sticks or Miyoko's Kitchen brand vegan butter in place of the butter.

Then you can either use a store-bought canned sweetened condensed coconut milk (I've bought it before and it's quite good!), or my homemade sweetened condensed milk, the dairy-free version. Make sure your chocolate chips are dairy-free, and if you can't find dairy-free white chocolate chips, just use any other dairy-free chip you like in its place.

Nut free 7 layer bars

In place of almonds, you can use more chocolate chipsโ€”or a different raw chopped nut if you can tolerate some nuts but not others. We just need pieces here that you can chew easily and hold their shape.

Coconut free 7 layer bars

Use other nuts in place of coconut chips!

This recipe for 7 Layer Bars is endlessly customizable, made easily with or without coconut, gluten free graham cracker crumbs, and even easily made dairy free!

Frequently asked questions

Why are they called 7 layer bars?

They're called 7 layer bars because they technically have 7 layers: graham cracker crumbs, butter, 2 types of chips, coconut, nuts, and sweetened condensed milk. In reality, those are really more like 7 ingredients, but 7 layer bars sounds better than 7 ingredient bars!

Are 7 layer bars the same as hello dolly bars? What about magic squares?

They're actually all the same thing! I have always assumed that in some parts of the country, they are more likely to be known by one name than another. I think it's similar to how, in Minnesota what they call a hot dish, I might just call a casserole.

I don't like any kind of nuts. Can I still make these magic squares?

You sure can! Since 4 of the 7 ingredients are just individual pieces that don't really change shape, but come together because they are bound together with sweetened condensed milk, you can really replace any of them you like. So if you don't like nuts at all, try adding more coconut, or a different sort of chocolate or flavored chip. Just use a similar amount, by weight, and it should be delicious.

Do I have to toast the coconut chips ahead of time?

No! Toasting the coconut chips alone in a warm oven for a few minutes brings out the natural flavor and aroma of the coconut, but you can skip that step if you don't want to bother. The coconut chips will still brown a bit in the oven when they're baked as part of the assembled bars.

Can I use shredded coconut instead of coconut chips?

Yes! Shredded coconut doesn't really taste like coconut to me, and I like coconut, so I prefer to use unsweetened coconut chips, sometimes referred to as flakes. But you can use an equal amount, by weight, of unsweetened shredded coconut if that's what you like best.

How do I store any leftover bars?

I like these bars best when they're kept in the refrigerator, and they also hold together best that way. I first cut the whole into 9 equal square bars, but when I'm storing leftovers, I put them in a tightly sealed container and stash them in the refrigerator. The sugar acts as a preservative, and they'll stay fresh for up to 2 weeks in the refrigerator. You can freeze them in a tightly sealed freezer-safe container for up to 3 months, but be sure to defrost in the refrigerator before serving.

Are these gluten free 7 layer bars?

Seven layer bars are gluten free if they're made with gluten free graham cracker crumbs. I have a recipe for gluten free graham crackers that you can make into crumbs, and you can also buy gluten free graham crackers to make into crumbs. Be sure that your nuts and chips are also safely gluten free, too, if that's necessary as they sometimes contain gluten ingredients and nuts often have a “may contain wheat” statement. I buy many of my gluten free nuts from nuts.com.

One 7 layer bar on small white round plate on blue cloth

7 Layer Bars

5 from 4 votes
Prep Time: 15 minutes
Cook Time: 30 minutes
Chilling time: 30 minutes
Yield: 9 bars
These chewy 7 layer bars have a buttery graham cracker crust, chocolate, nuts, coconut, topped with rich sweetened condensed milk.
Save this recipe!
Get this sent to your inbox, plus get new recipes from us every week!
Please enable JavaScript in your browser to complete this form.

Ingredients 

  • 1 ยฝ cups (120 g) coconut flakes/chips, plus some more for sprinkling
  • 1 ยฝ cups (225 g) graham cracker crumbs, gluten free if necessary (See Recipe Notes)
  • 8 tablespoons (112 g) unsalted butter, melted and cooled
  • 4 ounces semi-sweet chocolate chips, plus a few more for sprinkling
  • 4 ounces white chocolate chips, plus a few more for sprinkling
  • 1 ยฝ cups (120 g) raw pecan pieces, (or a combination of semi-soft raw or baked nuts; I like a combination of cashews and pecans)
  • 14 ounces (1 can or pouch) sweetened condensed milk, or homemade sweetened condensed milk

Instructions 

  • Preheat your oven to 300ยฐF.
  • Grease and line an 8 x 8-inch square baking dish, and set it aside. I like to use nonstick aluminum foil to line the pan, since it stays in place and doesn't stick to the bars after they cool. You can use parchment paper, or regular aluminum foil and spray it with nonstick cooking spray.

Toast the coconut chips

  • Place the coconut chips on an unlined quarter sheet pan or jelly roll pan. Once the oven has reached temperature, place that pan in the oven and bake for about 5 minutes or until the coconut chips have begun to brown.
  • For the most evenly toasted chips, stir them once after about 2 minutes of baking and return the pan to the oven.
  • Remove the coconut chips from the oven and set them aside to allow them to cool briefly.
  • Increase the oven temperature to 350ยฐF.

Make the bars.

  • In a medium-sized bowl, place the cookie crumbs and the melted butter, and mix to combine well.
  • Transfer the mixture to the prepared baking dish and press it firmly into the bottom.
  • On top of the cookie crust in even layers, add the semi-sweet chocolate chips, the white chocolate chips, the coconut, and the nuts. Reserve a few of the chocolate and white chocolate chips and some of the coconut.
  • Pour the sweetened condensed milk evenly over the top of the whole dish. Sprinkle the top evenly with the remaining more semi-sweet chocolate chips, white chocolate chips and/or coconut chips, if any.
  • Place the baking dish in the center of the preheated oven, and bake at 350ยฐF for 25 to 30 minutes, or until the top and sides of the dish are bubbling and the edges are beginning to brown.
  • The edges may also begin to pull away from the sides of the pan. If you're not entirely sure if the dish is done, reduce the oven temperature to about 325ยฐF and continue baking for another few minutes.
  • Remove the baking dish from the oven, and allow the bars to cool for at least 15 minutes in the pan. If you try to remove it too soon, it wonโ€™t hold together.
  • To make the bars easier to slice, chill in the refrigerator for 30 minutes.
  • Once cool, grab the overhanging baking pan liner and remove the bars from the pan.
  • With a wet knife, slice the bars into 9 equal squares. You can always slice into smaller pieces, but the approximate nutritional information is based on 1 of 9 squares.
  • Serve at room temperature or chilled from the refrigerator. Refrigerate any leftovers in a tightly sealed container for up to 2 weeks. Freeze for longer storage, but allow to defrost in the refrigerator or at room temperature before serving.

Video

Notes

For the graham cracker crumbs.
You'll need about 1 1/2 cups of graham cracker crumbs. If you're crushing your own graham crackers, whether it's my gluten free graham cracker recipe, your own, or store bought crackers, the easiest way to get the amount right is to measure the graham crackers by weight first.
The right weight of graham crackers will result in the right weight of crumbs. It usually takes about 1/2 my recipe of graham crackers, or about 10 full-size individual rectangular crackers.
I crush them in a mini food processor (affiliate link), since it makes the most uniform crumbs without making any of the graham crackers into paste like a blender can sometimes do. And a mini food processor is easier to clean than a big one.
You can use any sort of food processor or blender, or just put them in a zip-top storage bag and pound them with a rolling pin until they resemble coarse crumbs.
Nutritional facts.
Nutrition information is an estimate only, per bar, from online calculators, provided as a courtesy, and should not be relied on under any circumstances.

Nutrition

Serving: 1bar | Calories: 497kcal | Carbohydrates: 30g | Protein: 5g | Fat: 41g | Saturated Fat: 21g | Polyunsaturated Fat: 4g | Monounsaturated Fat: 13g | Trans Fat: 0.4g | Cholesterol: 30mg | Sodium: 112mg | Potassium: 280mg | Fiber: 5g | Sugar: 17g | Vitamin A: 331IU | Vitamin C: 0.5mg | Calcium: 62mg | Iron: 2mg

Nutrition information is automatically calculated, so should only be used as an approximation.

Like this? Leave a comment below!
This recipe for 7 Layer Bars is endlessly customizable, made easily with or without coconut, gluten free graham cracker crumbs, and even easily made dairy free! #cookies #glutenfree #easyrecipe
This recipe for 7 Layer Bars is endlessly customizable, made easily with or without coconut, gluten free graham cracker crumbs, and even easily made dairy free!
This recipe for 7 Layer Bars is endlessly customizable, made easily with or without coconut, gluten free graham cracker crumbs, and even easily made dairy free!

About Nicole Hunn

Hi, Iโ€™m Nicole. I create gluten free recipes that really work and taste as good as you remember. No more making separate meals when someone is GF, or buying packaged foods that arenโ€™t good enough to justify the price. At Gluten Free on a Shoestring, โ€œgood, for gluten freeโ€ just isnโ€™t good enough!

Leave a comment

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

Recipe Rating





This site uses Akismet to reduce spam. Learn how your comment data is processed.

26 Comments

  1. Jen S. says:

    Yesssss! Thank you!

  2. Karen says:

    Love your site and I have all your books. I had to laugh at your comment about people being mad about sugar ?

    1. Nicole Hunn says:

      Thank you, Karen, for all your support! If you were to see my blog inbox (or even the GFOAS Facebook page sometimes), you’d laugh, well, more. And then maybe you’d cry? ?

  3. Jacqie says:

    I’ve made this dairy free by using a can of sweetened coconut cream (Coco Lopez) instead of condensed milk. To make it pourable, set it in a pan of very hot water for 1/2 hours, shaking a few times. The bars are delicious!

  4. Donna C says:

    I first tasted this “magic cookie bar” in 1980. My cousin made them with graham crackers at the bottom. My ex-mother in law used to make them with Corn Flakes. The Corn Flakes were much better than the graham crackers, in my opinion. I make them with GF Corn Flakes. Sometimes, I eliminate the walnuts when bringing to a family party on the son in law’s side b/c someone there is quite allergic. Yes ma’am, these are incredibly customizable.

  5. Fatcat says:

    I’ve been wanting these since I went gluten free, thank you. Everyone at my house thinks you are a genius and we all want to live next door to you, in a non-creepy, just available to eat all your leftovers and near-misses kinda way. :-)

    1. Nicole Hunn says:

      Hahaha Fatcat, I wish! I think I’ve worn out my welcome with most of my neighbors. Most of the moms are all, no more sweets please! ??

  6. Brenda Potwin says:

    Do you have a good GF pie crust recipe?

    1. Nicole Hunn says:

      Of course, Brenda! Just use the search bar at the top of the page to look for whatever recipe you like. I have two go-to recipes for gluten free pie crust.

  7. Rachel Jacques says:

    I canโ€™t wait to make these, need to send hubby to pick up some coconut. Thank you so much for the quick tasty recipes. Iโ€™m old and not well, but can make lots of the recipes you make. As soon as I power up in the morning, I look for your emails. You are an absolute sweetheart.
    Thank you, Nicole.
    Rachel

    1. Nicole Hunn says:

      That’s so awesome, Rachel. I’m so honored to be a part of your life. :)

  8. Beth Pritchett says:

    Nicole, a search on sugar free sweetened condensed milk turned up a recipe. It uses a sweetener made of erythritol and stevia. You can also buy sugar free chocolate chips. I have used this type of sweetener and chocolate chips with success, but not this particular recipe for the milk…yet. I have always loved these layer bars. Thanks for putting so much effort into your quest for gluten free options.

    1. Nicole Hunn says:

      Erythritol has a strong cooling sensation, Beth, so I’m not really sure how good it would be concentrated and heated with milk. But if you feel like it would work, by all means go for it and let us know how it goes!

  9. Sophia says:

    Oh yum! I’m new to this blog and I can tell it’s going to be one of my favorites :) This recipe looks great. We all have to indulge once in a while – life would be so boring without that! I’ll be making them soon. Xoxo

    1. Nicole Hunn says:

      Amen to that, Sophia! My family doesn’t eat food like this every day, but if I didn’t make things like this available to my kids every now and again, they’d be the ones stuffing cupcakes into their mouths in the corner of every birthday party. :)

  10. Alma says:

    Hi Nicole
    My recipe for these bars calls for a 9×13 pan using 1 14oz can of condensed milk. Would using that much make these bars more moist in a smaller pan? Or is that the idea? Thanks

    1. Nicole Hunn says:

      I’m not really sure I understand what you’re asking, Alma, but if you already have a recipe that you prefer, no harm in just using that. This is how I do it!