Healthier Magic Cookie Bars (Vegan + Gluten-Free)

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.

A stack of healthier magic cookie bars. An almond flour coconut crust, topped with coconut caramel, coconut flakes, pecans and chocolate chips.

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.

Healthier magic cookie bars. An almond flour cookie crust topped with coconut caramel, coconut, pecans, and chocolate chips.

And I have a feeling that they would make an excellent Valentine’s Day treat to make for that special someone (or your family, friends, co-workers and neighbors)!

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 bars. An almond flour cookie crust topped with coconut caramel, coconut, pecans, and chocolate chips.

I mean, how could they not…

Chocolate + coconut + nuts = magic.

Healthier magic cookie bars. An almond flour cookie crust topped with coconut caramel, coconut, pecans, and chocolate chips.

I hope you all like these as much as we do!

Hand holding a healthier, gluten free, grain free, vegan, magic cookie bar. An almond flour cookie crust topped with coconut caramel, coconut, pecans, and chocolate chips.

If you make these healthy magic cookie bars please be sure to leave a comment and star rating below letting me know how they turn out. Your feedback is so helpful for the EBF team and other EBF readers!


Healthier Magic Cookie Bars

  • Author: Brittany Mullins
  • Prep Time: 15 minutes
  • Cook Time: 75 minutes
  • Total Time: 1 hour 30 minutes
  • Yield: 16


Healthier magic cookie bars made grain-free, gluten-free and vegan with homemade sweetened condensed coconut milk. 



  • 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


  • 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


  1. Preheat oven to 350°F and line a square (8×8) glass baking dish with parchment paper.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.


Recipe adapted from Simply Living Healthy.

  • Category: Dessert
  • Method: Bake
  • Cuisine: American


  • Serving Size: 1 bar
  • Calories: 333
  • Sugar: 15g
  • Fat: 27g
  • Saturated Fat: 19g
  • Carbohydrates: 23g
  • Fiber: 4g
  • Protein: 3g

Keywords: magic cookie bars, coconut magic cookie bars, seven layer bars

Leave a comment

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

  1. 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. 🙂

  2. 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.

  3. 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!

    • hmmmm.. it does take quite a long time (about 45 minutes) — did you have it simmering for that long? Perhaps it wasn’t at a high enough heat during the simmer? I would also make sure the top of your pot is off while simmering. Hope these ideas help!

  4. I made these this weekend and they were fantastic! My friends loved them and there’s no way anyone would be able to tell these were made with 100% wholesome and nourishing ingredients. I’m going to make them for my colleagues this week and then tell them how healthful they are only after they’ve tried them. I get such a kick out of that.

  5. I made these tonight and they were REALLY GOOD!! My gluten free husband loved magic cookie bars so I’m glad I found a good gf version for him.

  6. My aunt and I used to make the original version every time I visited her. I sent her a link to this recipe, and she’s so excited to try it. Personally, I love how it’s still decadent and rich. Can’t wait to try it myself.

  7. Thank you for this recipe!! My friend used to make these all the time and I could not resist them! I will have to have her try this version to see if she will be able to tell they are GF and V. PS if you are still in New York- I highly recommend Pala for some GF V pizza. It is the best I have ever tried 🙂

  8. What a great recipe Brittany! So glad Isaac called to let us know you did a redo! My coworker has also made an autumn magic cookie bar recipe (think it has apples and maybe pumpkin too). I’ll send you that one if you want to experiment with that too.

    Can’t wait to try the recipe. I wonder if there is something that can replace the almond flour since Caroline can’t have nuts. I always do a batch without nuts for her when I make the unhealthy version.

    Hope you and Mr. Isaac have a great time in NYC.

    • I have made a similar version using chocolate chip cookies and coconut oil as the base.. and instead of nuts on the top i used pretzels… super yummy for nut free!

  9. These are my boyfriend’s favorite dessert! I never thought to test out a healthier (basically, dairy and gluten free) version, but if I do that means that I get to do some of the tasting too!

Subscribe + get eating!

Grab your Free 3 Day Clean Eating Meal Plan

Subscribe to our list and get your free printable PDF of the 3 Day Clean Eating Meal Plan and Shopping List!