These 7 layer bars, also called magic cookie bars, are incredibly simple to make. Layer everything in a pan, bake, and you have a crowd-pleasing dessert that’s perfect for potlucks and family gatherings.
Seven layer bars have been a classic for generations. Known variously as magic bars or magic cookie bars, they turn simple pantry ingredients into a rich, layered treat.
They were a familiar sight at potlucks when I was a child, though I didn’t realize the name until I rediscovered a recipe in my mother’s old cookbook. Once I made them, it clicked: I’d eaten these before, just never made them myself.

I adapted the recipe slightly, swapping butterscotch chips and walnuts for peanut butter chips and peanuts because that’s what I had on hand—and because my family prefers the peanut butter flavor. The beauty of seven layer bars is their flexibility: you can swap chips, nuts, and other add-ins to suit your tastes.
What makes them so appealing is how easy they are. Press a graham cracker crust into a pan, layer your chosen toppings, pour sweetened condensed milk over everything, and bake. Minimal effort, maximum reward.

Layering is straightforward: a buttery graham cracker base, then nuts, chocolate, chips, coconut, or any combination you prefer, followed by a generous drizzle of sweetened condensed milk that binds everything as it bakes.
My family loved this version, and I’ll be experimenting with more variations. These bars are a perfect blank canvas for favorite flavors.

Do you refrigerate 7 layer bars?
Refrigeration isn’t required for food safety since these bars don’t contain perishable fillings, but chilling has benefits. Chilled bars hold together better, are less crumbly, and are easier to slice into tidy squares. If you prefer a firmer texture, store them in the refrigerator; otherwise, room temperature storage is fine.

How long do seven layer bars stay fresh?
After baking, let the bars cool completely, cut them into squares, and store them in an airtight container. At room temperature they remain fresh for about 3–4 days. In the refrigerator they can last up to a week. In my house they rarely last that long, but proper storage will keep them tasting their best.

How do you cut bar cookies evenly?
For clean, even slices, line your baking dish with foil or parchment before assembling the layers. Leave an overhang on the long sides so you can lift the whole slab out when it’s cooled. Grease the paper lightly, press the crust in, layer the fillings, and bake as directed. Once cooled, lift the bars out using the overhang and place the slab on a cutting board to slice with a large, sharp knife.
Chilling the bars for at least an hour before cutting helps reduce crumbling and yields neater squares, though some edges—especially corners—may still break slightly. It won’t affect the flavor.

With these simple tips—line the pan, use parchment or foil, chill before cutting—you’ll get tidy, attractive bars every time.

How to make 7 Layer Bars:
- These bars are very simple: mix melted butter with graham cracker crumbs, press into a 9×13 pan, and layer your chosen toppings before baking. Few desserts are easier.
- Traditional seven layer bars often include chocolate chips, butterscotch chips, shredded coconut, and nuts (walnuts are common). My version uses semi-sweet chocolate chips, peanut butter chips, peanuts, and shredded coconut. Use whatever mix-ins you prefer—just don’t skip the sweetened condensed milk, which binds the layers as they bake.
- Serve chilled for firmer bars and cleaner slices, or keep them at room temperature if you prefer a softer texture.
Other bar cookie ideas
- Pecan Pie Bars
- S’mores Bars
- Apple Pie Bars
- Oatmeal Raisin Chocolate Chip Bars
- Peanut Butter Banana Oatmeal Bars
7 Layer Bars
These 7 layer bars, also called magic cookie bars, are so easy to make! Layer everything in a pan and bake, and everyone loves them! Such a great dessert!
10 minutes
25 minutes
35 minutes
Ingredients
- 1/2 cup butter, melted
- 1 1/2 cups graham wafer crumbs
- 1 cup chopped peanuts
- 1 cup semi-sweet chocolate chips
- 1 cup peanut butter chips
- 1 cup unsweetened shredded coconut
- 1 can (14 oz, 300 mL) sweetened condensed milk
Instructions
- Preheat the oven to 350 degrees F.
- Line a 9×13 inch baking dish with parchment paper or foil, spray lightly with cooking spray, and set aside.
- In a small bowl, stir together the melted butter and graham wafer crumbs until well combined.
- Press this mixture firmly into the prepared baking dish in an even layer.
- Layer the peanuts, chocolate chips, peanut butter chips, and coconut evenly over top of the graham wafer crust.
- Drizzle the sweetened condensed milk over top of everything, as evenly as possible. Spread it with a rubber spatula to make it as even as possible.
- Bake the bars for 25-30 minutes, or until the edges are golden brown and the middle is just set.
- Let the bars cool completely before lifting them out with the parchment paper and slicing them into squares. They will be easier to slice if you chill them for at least an hour first.
- Store the bars in an airtight container at room temperature or in the fridge (whichever you prefer) for 7-10 days.
Notes
Source: Adapted from The New Purity Cookbook.
Recommended Products
This post contains affiliate links. As an Amazon Associate, I may receive a small commission from qualifying purchases.
-
Measuring Cups/Spoons
-
Canola Oil Cooking Spray -
Parchment Paper 2-pack -
Pyrex 9 x 13 inch Baking Dish
Nutrition Information:
Yield:
24
Serving Size:
1
Amount Per Serving:
Calories: 198Total Fat: 14gSaturated Fat: 7gTrans Fat: 0gUnsaturated Fat: 6gCholesterol: 11mgSodium: 106mgCarbohydrates: 16gFiber: 2gSugar: 10gProtein: 4g
Nutrition information is an estimate based on ingredients used and may not be exact.