Magic Cookie Bars Recipe
Craving something sweet? This magic cookie bar recipe layers chocolate, coconut flakes, and nuts for an easy dessert that’s quick, delicious, and mess-free!

If you love cookies but want something even easier (and maybe a little more magical), you’ve got to try these Magic Cookie Bars! They’re sweet, crunchy, gooey, and just ridiculously good. The best part? You can throw everything in one pan and bake. No scooping, no chilling, no mess. Just pure dessert happiness.
What Are Magic Cookie Bars?
Magic Cookie Bars are a classic dessert made with layers of delicious goodness — think graham cracker crumbs, sweetened condensed milk, chocolate chips, shredded coconut, and nuts. 😋
They bake into chewy, sweet perfection with just the right amount of crunch. You know that feeling when you take a bite and instantly smile? Yeah, that’s these bars.
Plus, they’re super simple to make. No fancy tools, no mixer — just your favorite 9×13 pan and about 45 minutes of time.
Contains affiliate links for your convenience; learn more and see our full disclosure policy here. As an Amazon Associate I earn from qualifying purchases.
Ingredients You’ll Need
Here’s everything you’ll need for this easy recipe:
- ½ cup unsalted butter
- ½ cup graham cracker crumbs
- 1 (14 oz.) can sweetened condensed milk
- 1 (6 oz.) package milk chocolate chips (I use milk, but semi-sweet chocolate chips, dark chocolate chips, or white chocolate chips work here, use your favorite)
- 1 cup shredded coconut
- 1 cup chopped pecans or walnuts
That’s it! Six simple ingredients, all easy to find and even easier to love.
How to Make Magic Cookie Layer Bars
Let’s get baking magic bars!
- Preheat the oven to 350°F (175°C).
- Sprinkle the graham cracker crumbs evenly in the bottom of a 9×13-inch pan or baking dish.
- Melt the butter and drizzle the melted butter over the crumbs in the bottom of the pan.
- Pour half of the sweetened condensed milk evenly over the graham cracker crust.
- Top with chocolate chips, shredded coconut, and nuts.
- Drizzle the rest of the sweetened condensed milk on top.
- Press everything down gently with the back of a spoon.
- Bake for 25–30 minutes or until the top is golden brown.
- Cool completely before cutting into squares (if you can wait that long 😅).
These bars are rich, chewy, and oh-so-satisfying.

Where to Take or Use These Bars
These bars are perfect for just about any occasion:
- Holiday cookie exchanges 🎄
- School bake sales
- Potlucks or parties
- After-dinner dessert with a cup of coffee ☕
- Wrapped in cute boxes for neighbor gifts
They travel well and look so pretty on a dessert tray. Trust me, they’ll disappear fast!
Variations to Try
Want to mix things up? Here are some fun twists!
- Swap the chocolate chips for white chocolate or butterscotch chips.
- Add a drizzle of caramel on top for extra sweetness.
- Use different nuts, like almonds or hazelnuts.
- Make it nut-free by skipping the pecans and adding extra coconut or mini marshmallows instead.
- Holiday twist: sprinkle red and green M&Ms on top for Christmas magic. 🎅
Little changes can make this treat feel new every time.

Storage and Make-Ahead Tips
You can totally make these bars ahead of time.
After cooling, store them in an airtight container at room temperature for up to 5 days. They actually taste even better the next day when all the flavors meld together!
Want to freeze them? Sure thing. Just cut the bars, wrap them individually in plastic wrap, and place them in a freezer-safe bag. They’ll keep for up to 3 months. To enjoy, thaw at room temperature for about an hour.
Common Questions About Magic Cookie Bars
Do I need to line the pan with parchment paper or foil?
It’s not required, but it helps with easy removal (and less cleanup).
Can I make these without coconut?
Of course! Just replace it with extra nuts or chocolate chips if you prefer.
Why are they called “magic” bars?
Because somehow, with almost no effort, you end up with a dessert that tastes like it took hours to make. That’s pure baking magic. 🪄
Can I double the recipe?
Yes, just use a larger baking pan or make two 9×13 pans. Perfect for big gatherings!
Magic Cookie Bars Recipe
Ingredients
- 1/2 cup butter
- 1/2 cup graham cracker crumbs
- 1 – 14 oz. sweetened condensed milk
- 1 – 6 oz. package of chocolate chips
- 1 cup shredded coconut
- 1 cup chopped pecans or walnuts
Instructions
- Sprinkle graham cracker crumbs in a 9 x 13 pan.
- Melt margarine and drizzle over crumbs in pan.
- Pour half of sweetened condensed milk over the crumbs.
- Top evenly with remaining ingredients.
- Pour remaining sweetened condensed milk over ingredients in pan.
- Press down gently over all the bars.
- Bake at 350 degrees for 25 to 30 minutes.
- Cool completely before cutting.
Shop My Kitchen Favorites
Contains affiliate links for your convenience; learn more and see our full disclosure policy here. As an Amazon Associate I earn from qualifying purchases.
Shop and check out my favorite kitchen, cooking, and baking must haves. These are items I use in my own kitchen and love!
And as a bonus, don’t miss out on my FREE Kitchen Conversions chart. Enter your email below and you can print it off for your kitchen!
Final Thoughts
These Magic Cookie Bars are everything you want in a dessert — easy, sweet, and totally crowd-pleasing. They’re the kind of recipe you’ll come back to again and again, especially during the holidays. A true treat for the taste buds.
So grab those simple ingredients and get baking! And when your kitchen smells amazing (because it will), snap a pic and share it — I’d love to see your creation!
Don’t forget to sign up for my email list for more easy dessert recipes, printables, and fun holiday ideas that make mom life just a little more magical. 💕
More Desserts to Try:
Please pin this post for later and follow along on Pinterest:





Originally Posted 12/13/2014 — Updated October 20, 2025









4 Comments