This post may contain affiliate links. Please read our disclosure policy.
Magic bars, also called 7-layer bars, are made with seven layers of gooey decadence, including melty chocolate chips and coconut on a crisp graham crust. Not overly sweet with a hint of salt makes these a modern take on classic magic cookie bars.
Try my Pumpkin Bars Recipe for your next holiday treat!

Want to Save This Recipe?
Enter your email & I'll send it to your inbox. Plus, get great new recipes from me every week!
By submitting this form, you consent to receive emails from The Kitchen Girl.
Why You’ll Love This Recipe
- Magic cookie bars come together in just a few minutes and bake in one pan.
- They feel as indulgent as the classic 7-layer bars but with a more balanced sweetness.
- Unsweetened coconut and flaky sea salt add a gourmet flavor touch.
- They cool into firm, clean-cut bars that hold their shape beautifully.
- Great for holidays, potlucks, lunchbox treats, or last-minute desserts.
What Are Magic Bars?
Magic bars, sometimes called magic cookie bars, Hello Dolly bars, or 7-layer bars, are a classic layered dessert made with a graham cracker crust, chocolate, nuts, coconut, and sweetened condensed milk. Everything melts together as it bakes, creating soft, gooey layers with chewy edges and a rich, buttery base.
If you grew up with seven layer bars, you'll love this modern twist on an old-school classic.
Ingredients You’ll Need
- Graham Cracker Crumbs: These help create the first layer, which slices neatly once cooled and tastes like the familiar decadence of graham cracker crust.
- Unsalted Butter: Binds the crust and adds a golden, toasty flavor.
- Chocolate Chips: Use semi-sweet, dark, milk, or a combination.
- White Chocolate Chips or Butterscotch Chips: White chocolate chips bake to a butterscotch-like color, mimicking the classic look while offering a milder, less-sweet flavor.
- Chopped Walnuts: Add crunch and balance the richness—optional if you prefer a nut-free option.
- Shredded Coconut: Use sweetened or unsweetened. I prefer unsweetened since the graham crackers, chocolate chips, and condensed milk already add plenty of sweetness.
- Sweetened Condensed Milk: The signature ingredient that binds every layer as it bakes.
- Flaky Sea Salt: Optional, but it balances the sweetness beautifully.

How to Make Magic Bars
Heat the oven to 350°F and prep a 9x13 pan with cooking spray and a parchment sling. Mix the melted butter and graham cracker crumbs until sandy, then press evenly into the pan.


Add the layers by sprinkling the chocolate chips, chopped walnuts, and shredded coconut evenly over the crust. Hold back a small handful of each to garnish the top.


Drizzle the sweetened condensed milk over the surface (warm it if needed to pour). Add the reserved toppings and sprinkle flaky sea salt if you're using it.


Bake for 25–30 minutes or until the edges are golden and the top looks set. Let the bars cool completely in the pan so they firm up.

Lift and slice by pulling the parchment sling up. Cut into squares and store the bars at room temperature for up to 7 days.


Modern Twists That Make This Version Better
- I use unsweetened coconut in place of sweetened coconut because there is plenty of sugar in this recipe without it ... and nobody ever misses it.
- I replace the traditional butterscotch chips with white chocolate chips, which knocks down the sweetness and gives the bars a milder flavor.
- A tiny sprinkle of flaky sea salt balances the richness and makes the flavors pop.
- The crust is firm and structured, so the bars slice cleanly without crumbling.
- Clear visual cues (like “damp sand” crust texture) help beginner cooks succeed.
These small changes keep the nostalgic flavor but make the bars feel more balanced, modern, and less heavy or sugary than the classic ones.
Prefer the Old-Fashioned Cookie Bar? Do This Instead:
If you want your bars closer to the classic 7-layer bars from the 1960s, here are a few quick swaps:
- Use sweetened shredded coconut.
- Add butterscotch chips in place of white chocolate chips.
- Skip the flaky sea salt. On second thought, keep it because everyone loves sweet and salty layer bars!
Tips for the Best Magic Bars
- Pan type: Use any 9 x 13 baking dish or baking pan. Nonstick is NOT required for this magic cookie bar recipe.
- Graham crackers: Different brands vary in size and weight, so the 2-cup crumb measurement is the most reliable. You’ll usually need 16–18 full sheets.
- Coconut: I prefer unsweetened because sweetened coconut makes these bars a bit too sweet for me, since the other ingredients already have sugar. Use what you like.
- Chocolate choices: Any chocolate chips work—milk, semi-sweet, dark, or a mix. Butterscotch chips are the old-school option, but they’re optional if you don’t love them.
- Variations: Crushed pretzels can replace the coconut for a salty twist.

Storage Tips
- Cool the bars completely before storing to prevent moisture in the container.
- Separate layers with wax paper when stacking them to prevent sticking.
- Store sliced bars at room temperature for up to 7 days.
More Handheld Holiday Desserts You'll Love
- Brown Butter Rice Krispie Treats
- Peppermint Rice Krispie Treats
- Chocolate Covered Nuts Recipe
- Peppermint White Chocolate Pretzels
📖 Recipe

Easy Magic Bars Recipe
Want to Save This Recipe?
Enter your email & I'll send it to your inbox. Plus, get great new recipes from me every week!
By submitting this form, you consent to receive emails from The Kitchen Girl.
Video
Note about scaling
When scaling, the light gray ingredient notes after the comma don’t change. Adjust as needed.
Ingredients
- 2 cups Graham Cracker Crumbs, about 16-18 full sheets
- 1 stick Salted Butter, melted
- 1 cup Semisweet Chocolate Chips, or other variety
- ½ cup White Chocolate Chips, or Butterscotch Chips
- 1 cup Chopped Walnuts or Pecans
- 1 cup Shredded Coconut, Unsweetened or sweetened
- 1 (14-oz can) Sweetened Condensed Milk
Optional finish
- Flaky Sea Salt, to taste
Instructions
- Prep the pan: Heat the oven to 350°F. Coat a 9x13 baking dish with cooking spray and line it with PARCHMENT that hangs over two opposite sides to form a sling.
- Make the crust: In a mixing bowl, combine the MELTED BUTTER and GRAHAM CRACKER CRUMBS until the mixture resembles damp sand and holds together when pressed. Press it evenly into the pan.
- Start layering: Sprinkle the CHOCOLATE CHIPS, CHOPPED WALNUTS, and SHREDDED COCONUT evenly over the crust, holding back a small scoop of each for topping.
- Add condensed milk: Warm the SWEETENED CONDENSED MILK until pourable, then drizzle it evenly over the layers. Sprinkle the reserved toppings and add FLAKY SEA SALT if using.
- Bake + cool: Bake for 25–30 minutes, or until the edges are golden and the top is set. Cool completely in the pan.
- Lift + store: Use the parchment sling to lift the bars out in one piece, slice into squares, and store at room temperature for up to seven days.
Recipe Notes
Equipment
- parchment paper
- spatula
Nutrition
Nutrition facts are estimates and may vary based on brands, ingredients, and portions.






Heather Smith says
Question, have you made this with sweetened condensed coconut milk? I have a good fake butter so that would make them dairy free for me and vegan for friends.
Traci says
I haven’t tried that myself, so I'm not able to make any recommendations from the test kitchen. But your idea sounds totally reasonable in theory. If you do make them that way, I’d love to hear how they turn out!
JB says
I love how seven simple ingredients make one pan of pure magic. The sweetness doesn’t overwhelm, and that little salty moment is chef’s kiss. Nailed it, KG!
Traci says
They really are magic bars for how delicious and decadent and easy they are. I'm glad you're loving this version. Thank you for letting me know! 🙂