Healthier Magic Cookie Bars (Vegan + Gluten-Free)
This post may include affiliate links. Thank you for your support.
Healthier magic cookie bars made grain-free, gluten-free and vegan with homemade sweetened condensed coconut milk.
Last month I went to Isaac’s school for a holiday celebration and as luck would have it a parent had brought in Magic Cookie Bars for the teachers. Remember those bad boys? Some people call them Seven Layer Bars but they have a graham cracker crust, chocolate chips, coconut and sweetened condensed milk… so rich and delicious! My mom used to make them and they were one of my favorite holiday baked goods.

At Isaac’s school that day, I couldn’t resist having a bite (or two). It was just as a good as I remembered it: before long the wheels started turning in my head and I had my mind set on making a version of my own. I can’t really call these healthy because they’re still decadent, but they’re made with wholesome ingredients and a bit healthier.
Having tasted the classic version only a day or two before I made this variation, I can honestly say they look and taste like the real deal. You could easily take them to a party, not tell anyone that they’re grain-free, dairy free and made with sweetened condensed coconut milk and people would go crazy for them.

Healthier Magic Cookie Bar Ingredients
- almond flour
- unsweetened shredded coconut and unsweetened flaked coconut
- full fat coconut milk
- coconut sugar
- chocolate chips – I like using Enjoy Life or Lily’s chocolate chips to keep this recipe dairy-free.
- chopped pecans
- coconut oil
- maple syrup
- vanilla extract
- sea salt

How to Make Magic Cookie Bars
Make the crust – Combine the almond flour, shredded coconut, coconut oil, maple syrup, vanilla and sea salt in a large bowl. Press firmly into a 8×8 baking dish lined with parchment paper. Bake at 350ºF for 12-15 minutes or until your crust is golden brown. Remove from the oven and let cool on a wire rack.
Make sweetened condensed coconut milk – While the crust is cooling, combine the coconut milk and sugar in a saucepan over medium heat. Bring to a low boil, reduce heat and simmer for 45 minutes, stirring frequently, until the mixture has reduced by about half. Remove from the heat and let cool slightly. Pour the condensed milk over the crust and spread to the edges.
Add toppings – Sprinkle the chocolate chips evenly over the condensed milk, then add the flaked coconut and then the pecans. Use your hands to press the mixture down slightly until the milk soaks upward into the toppings.
Bake – Bake the bars for 30 minutes at 350ºF until edges are browning a bit. Remove from the oven and let cool for 30-60 minutes on a cooling rack. After cooling a bit, place the pan in the refrigerator to let them set up for at least two hours. If you’re in a rush you can freeze them for an hour instead.
Cut and enjoy – After cooling, lift the parchment out of the pan and place the bars on a cutting board or other flat surface. Cut the bars into 16 squares and dig in!

How to Store Magic Cookie Bars
Any leftover bars should be wrapped or placed in an airtight container. They will keep for a couple days on the countertop but I recommend storing in the fridge or freezer for longer storage.

More Tasty Desserts to Try
- 4-Ingredient Almond Coconut Cookies
- Healthy Peanut Butter Balls
- Healthy No Bake Cookies
- Easy Healthier Butterfingers
- Chocolate Banana Ice Cream
- Vegan Graham Cracker Blondies
- Vegan Chocolate Pie
- Healthy Lemon Bars
Be sure to check out the full collection of dessert recipes here on EBF as well.
If you enjoyed this recipe, please consider leaving a ⭐ star rating and let me know how it went in the 📝 comments below.

Healthier Magic Cookie Bars
Ingredients
Crust:
- 3/4 cup almond flour
- 3/4 cup unsweetened shredded coconut
- 1/8 cup coconut oil, liquid
- 1/2 Tablespoon maple syrup
- 1 teaspoon vanilla
- 1/4 teaspoon sea salt
Layers
- 1 can, 13.5 oz full-fat coconut milk
- 1/2 cup coconut sugar
- 1 cup vegan chocolate chips, I used Enjoy Life
- 1 cup unsweetened flaked coconut
- 1/2 cup chopped pecans
Instructions
- Preheat oven to 350°F and line a square (8×8) glass baking dish with parchment paper.
- Combine all ingredients for the crust in a large bowl and press firmly into the prepared pan. Bake for 12 to 15 minutes until your crust is golden brown in color. Remove from oven and cool on a wire rack.
- While crust is cooling, in a saucepan over medium heat bring coconut milk and sugar to a low boil, reduce heat and simmer for approximately 45 minutes, stirring frequently until the mixture has reduced by half. The coconut milk mixture should be thick reduced to about 3/4 cup. Remove from heat and cool slightly. Pour the sweetened condensed coconut milk over the crust and spread to the edges.
- Sprinkle the chocolate chips evenly over the condensed milk, then the flaked coconut, and then the pecans. Using your hands, press the mixture down a tiny bit until the milk soaks upward into the layers.
- Place in oven (still at 350°F) and bake for about 30 minutes, until edges are browning a bit. Remove from oven and cool for 30 to 60 minutes on a cooling rack. Once the bars have cooled a bit, place the pan in the refrigerator to allow the bars to set-up for at least two hours (or overnight). If you’re in a rush you could put the bars in the freezer for an hour instead.
- After cooling, lift the parchment out of the pan and place bars on a cutting board or other flat surface. If the bars are coming from the freezer, you may need to let them thaw for a few minutes before cutting as they will be pretty firm. Cut bars into 16 squares and dig in! Any leftover bars should be wrapped or placed in a sealed container. They can be left out for a couple days or stored in the fridge or freezer for longer storage.
Video
Notes
Nutrition
Nutrition information is automatically calculated, so should only be used as an approximation.
Like This Recipe? Rate & Comment Below!












Omg made them yesterday, saw them on your instagram ! Wow, I think I didn’t let the coconut milk reduce enough but it was a gooey heaven. I put most of them in the freezer so I don’t eat them all ! Seriously I just wish I found this recipe earlier, I have always love magic bars but know it is not the healthiest so it had been a while since I had some, and really does taste as the less healthy version 🙂
Ahh that makes me so happy to hear, Emilie!! I’m so glad you tried this recipe and loved it. 🙂 Thanks so much for coming back to leave a comment + star rating. It means the world to me. <3
I’ve been craving a good dessert with some substance (being gluten free (And rice/oat free) sometimes I miss the texture of food). This was an out of park home run – and my gluten eating husband also gave it a 5+ rating! (Darn now he and I will be competing to eat them)
Thank you!
Ahh I love hearing that, Judy! Looks like you might have to make a double batch next time. 🙂 Thanks for coming back to leave a comment + star rating. It means the world to me!
Thank you for sharing this recipe – is it ok to substitute other kids of flour – eg coconut flour, oat flour? what would that change the baking time?
I’m not 100% sure because I’ve only tried it with almond flour, but feel free to experiment! Coconut flour typically requires more liquid so I’d probably use less (maybe 1/2 cup instead of 3/4 cup)? Let me know how they turn out if you try them. 🙂
this is pretty sweet!!! my family is obsessed with classic magic cookie bars, i wonder if i can trick them with these.
I bet they’ll love this version. They’re just as good.
These look soo yummy! Thank you so much for offering vegan, gluten free recipes – it’s such a huge help.
Yum! These sound absolutely amazing!
I made them tonight! They turned out beautifully – and that condensed coconut milk is amazing. 🙂
Hooray! So happy that they turned out well. Enjoy! 🙂
Wondering if walnut flour could be used , as. my daughter is sensitive to almonds
Thank you for postinng your recipes!
Hey Kris – Yes, I think walnut or oat flour would work just fine as a replacement for the almond flour. Let me know how they turn out for you if you make these bars. 🙂
This recipe looks wonderful! I’m planning to make these for the holidays this year. My dad requested a healthier version of magic bars, and I think this recipe looks like the perfect fit.
Yay! Let me know how they turn out.
Seriously?! I haven’t had these in SOOO long! Can’t wait to try them!
I made these cookie bars last week and, even though they were slightly singed, they were delish! I made them again yesterday and they were even better because I didn’t burn them this time! My mum used to make the 7 layer cookie bars on rare occasions when I was a kid, and I remember them as yummy, delectable treats – and very rich. This vegan, refined-sugar free recipe is just as good – actually better since they are so benign.
Many thanks for the great recipe!