Magic Cookie Bars
Magic cookie bars really do taste like magic. When you sink your teeth into these incredible bars, you won’t believe that they are actually so much healthier than other versions. Coconut, chocolate chips, and walnuts are the star of the show in these keto magic cookie bars. This easy keto recipe is also low carb, gluten-free, grain-free, sugar-free, and Trim Healthy Mama friendly.

I’m sure you are well aware of the fact when you try to eat healthily, there are days when you feel like you have to give up stuff. At the end of the day you really aren’t giving up anything, but instead, you are giving yourself health instead! That’s way better than junk food, in my opinion. With that being said, I love that I can take a recipe that is typically incredibly unhealthy and turning it into a delicious keto friendly recipe that fits my needs.
When I serve this magic cookie bar recipe or my single serve cookie to my friends and family, they don’t even realize they are gluten free.. It’s honestly hard to stick to only eating one, so sometimes I will indulge in a second one. As long as you don’t eat many of them as a keto dessert every day it’s completely fine to have an extra treat here and there.
These keto magic cookie bars are perfect for picnics, family gatherings, or a quick and simple dessert option. No matter when you serve them, I am confident they are going to be a HUGE hit with everyone who tastes them. And no matter if they call them hello dollies, seven layer bars, or something else entirely!

How To Make Magic Cookie Bars
These keto low carb magic cookie bars are easy to make. Promise! You mix up the crust, press it into a pan, make the sweetened condensed milk recipe, layer toppings, and then bake.
First Step: Prepare the crust by adding the flour, flax, and melted butter to the bottom of a baking dish. Bake the crust until golden brown which is around 12 minutes at 350 degrees F.

Second Step: Make the keto sweetened condensed milk by bringing the heavy cream, butter, and sweetener to a gentle boil. Stir frequently, so it doesn’t burn. The low carb condensed milk will be a light golden brown color and will thicken up enough to coat a spoon when it’s done.

Third Step: Allow the sugar-free condensed milk time to cool then stir in the egg yolk. If you are in a hurry, you can also slowly pour the liquid over the egg yolk and whisking as fast as you can.
NOTE: Whisking the egg and condensed milk is vital because otherwise, you may end up with a scrambled egg in your magic cookie bars.

Fourth Step: Assemble the cookie bars by sprinkling coconut, chocolate chips, and walnuts on top of the crust. Slowly drizzle the condensed milk over the top, then back for 20-25 minutes at 350 degrees. They will be golden brown and set when they are done. Chill in the refrigerator to prevent the crust from crumbling.

Magic Cookie Bars Variations
Feel free to be unique to your own tastes when you make these keto magic cookie bars! You can add in extra ingredients or leave them exactly as I have written. Either way, they are going to be rich and flavorful. Here are just a few ideas to try out.
- Cinnamon – Sprinkle a little bit of cinnamon in the crust for a spicy and fun flavor. So good!
- Almonds – Chop some almonds and use them instead of the walnuts if you want to. They enhance the flavor and are super yummy.
- Toasted Coconut – Instead of using coconut that hasn’t been toasted, try toasting some in a dry skillet. The coconut only takes a couple of minutes to toast, so keep a close eye on it. Then add them to the bars and enjoy!
- Pecans – Don’t you just love the flavor of pecans with chocolate? Add some in place of the walnuts for a nice surprise. Delicious!
- White Chocolate Chips – with sugar-free white chocolate chips now available they are a great choice!
In a hurry? Skip the crust and make my Five Minute Magic Cookies!

How Long Do Magic Bars Last?
These keto magic bars will last around 5 days if they are correctly stored. Keep them in an airtight container in the fridge. I typically store all the baked goods from my keto recipes in the fridge to make them last longer.
Can You Freeze Cookie Bars?
Yes, you can freeze this cookie bars recipe if you want to. It’s nice to make a double batch and have them ready for last-minute dessert ideas. Wrap them with plastic wrap and put them into an airtight container. On average, the magic cookie bars will last around 3 months in the freezer. To thaw, simply place in the fridge overnight then serve.
Another option is to give these cookie bars out to friends that lost a loved one, a new mom, or even a new neighbor that just moved in. They can eat them right away or freeze them for later and will be very appreciated.
Craving more keto desserts? Check out some of these low carb desserts that are sure to please you or a crowd.
- Keto Crepes Gluten-Free
- Mascarpone Cheesecake
- White Chocolate Peanut Butter Blondies
- Chocolate Chip Pecan Cookies
Love this recipe? Try my new Caramel Magic Cookie Bars and my White Chocolate Cranberry Seven Layer Bars!
Like what you see? Follow me on Facebook! Love this recipe? Leave a comment & 5-star rating right here! Make sure you don’t miss new low carb keto recipes by getting email updates!
Want to Save This Recipe?
Enter your email below & we'll send it to your inbox. Plus get great new recipes from us every week!
By submitting this form, you consent to receive emails from Joy Filled Eats

Magic Cookie Bars
Ingredients
Crust:
- 1/4 cup almond flour
- 1/4 cup coconut flour
- 1/4 cup ground golden flax (or additional almond flour)
- 1/4 cup melted butter
- 1 egg white
Sweetened Condensed Milk:
- 1/4 cup heavy cream
- 2 tbsp butter
- 1/2 cup Joy Filled Eats Sweetener (or see alternatives in recipe notes)
- 1 egg yolk
Toppings:
- 1/2 cup unsweetened flaked coconut
- 1/2 cup sugar free chocolate chips
- 1/2 cup chopped walnuts (or other nut of choice)
Instructions
- Combine crust ingredients and press into the bottom of a 8×8 baking dish. Prick holes in the crust with a fork. This helps the topping not separate. Bake at 350 for 12 min. or until golden brown.
- Meanwhile, make the sugar free condensed milk. Bring the heavy cream, 2 tablespoons butter, and sweetener to a gentle boil and cook stirring frequently until it is light golden brown and thick enough to coat the back of a spoon.
- Remove from the heat. Either cool until room temperature before stirring in the egg yolk OR, if you are impatient like me, very slowly pour the liquid over the egg yolk while whisking like crazy. (No one wants scrambled yolk in their magic cookie bars).
- Now it is time to assemble. Sprinkle coconut, chocolate chips, and walnuts onto the crust. Drizzle condensed milk over the top. Bake at 350 for 20-25 min. until set and golden brown. Cool completely and chill in the fridge before serving or the crust can crumble.
Notes
Nutrition
Originally Published December 15, 2015. Revised and Republished October 23, 2019.










Any way to make this without the heavy cream? Would cashew cream or coconut cream work? I’m good with the butter, but can’t do the heavy cream.
You can sub in coconut milk but you may need to cook it longer.
Great! Thanks!
Hi! Thank you for the recipe…in the oven now! I only had Lily’s Chocolate Chips on hand (55% cocoa). Do you have a brand you use that is 85% dark that you would recommend or is the 55% still okay?
Lily’s chocolate chips are fine 🙂
Looks yummy! Do you know the nutritional breakdown? Number of carbs?
3 total carbs per bar, 1 net carb. I just added a nutrition breakdown to the bottom of the post 🙂
Do you think you could maybe add thm protein powder to the crust to make it more of a protein bar type of thing without changing the taste? I absolutely loved it as is (without the coconut) but wondered how protein powder would affect it. Thanks!
I’m not sure. Sorry. If you try it let me know how they turn out.
I made a large batch of thm sweetened condensed milk (SCM) to store and use for holiday baking. How much SCM does this recipe produce? I’d like to use my prepared SCM to make this. I’m assuming it’s about 1/2 to 3/4c.
2/3 cup. My recipe does have egg yolk though. You may want to add one if you are using a different condensed milk recipe. http://joyfilledeats.com/sweetened-condensed-milk/
Thanks! I made this with 1/2 cup, and no egg yolk (I was too impatient) and it turned out wonderfully. I’ll have to follow your recipe completely next time. The only problem is they were too good, and they are already almost gone!
Good Morning Taryn!
First let me say MCB are won of my absolute favorite THM desserts, but this makes them dangerous. I’m easily a Turtle if I don’t control myself. what is the serving size for this? I can easily stack my fuels and this is dessert is an easy fuel stacker for me.
Your recipes are some of my favorite from the THM bloggers world. You seem to have got the knack for combining ingredients and creating dishes that even the Grinchiest THM opposer (we all know one or two ) have to admit, “Mmm thats pretty good.” 😉
I hope you Christmas is happy and the New Year continues to be “Joy-Filled.”
Katie in AL
Hi Katie, Thank you for your kind words 🙂 A good serving for this is 1 piece. They are pretty rich. I cut an 8 x 8 pan into 16 pieces.
My family is not a fan of coconut. Can it be left out or do I need to substitute something else?
Hi Viki, you can leave them out or use more nuts and/or chocolate chips.
What is gentle sweet?
It is a sweetener blend of xylitol, erythritol, and stevia that is twice as sweet as sugar. You might find this chart helpful: http://www.trimhealthymama.com/main-home/sweetener-conversion-chart/
Help!! My sweetened condensed milk turned chocolate covered and is still not thickly clinging to back of spoon. Did I add butter too soon? Tastes good though, so I am still going to use.
Hi Linda, that shouldn’t really matter for this recipe. Which sweetener are you using? Do you mean it got dark before it thickened? The heat might have been too high. How long was it cooking for?
I used Gentle Sweet and the heat was on 2 (5 is medium) but it is a stainless steel pot. I thought it cooked for a very long time (45 minutes) but didn’t cling thickly to the spoon when cooking. Now that I let cool before adding egg yolk, it is consistency of caramel. LOL. So maybe when you said “cling to back of spoon” it is just a thin film that drops off?
You should just be able to draw a line on your spoon with your finger and have it stay there. There is a photo in the post that demonstrates that. I normally only cook this for 10-15 minutes so yes, you did make caramel. Still delicious 🙂 You just reduced it more than necessary.
Laughing. Okay, thank you.
Any suggestions on where to buy ground golden flax in store?
Also what is the gentle sweet copycat? I am new to this site. Thank you!
Hi Marissa, most stores have golden flax. Or you can order it online. I’ve ordered it from Amazon, iherb, and jet.com. I have a sweetener that measures just like gentle sweet that you can make to save a bit. It is a mix of xylitol, erythritol, and stevia. http://www.joyfilledeats.com/sweetener
I found the flax at Albertson’s.
I barely ever have heavy cream in the house but we always have half/half… Do you think i could get away with using that instead or should i really make an effort to acquire the heavy cream?
Thanks!
Lazygirlhere
Hi Bonnie, half and half should work but may take longer to cook.
When the sweetened condensed milk cools (before you whisk in the eggs) have you noticed if it’s gotten granular? And when i liked the spoon it’s like it cooled my mouth off.
I used Truvia.
Hi Jessica,
I have not used Truvia in this recipe so I’m not sure why it’s getting granular that quickly. My sweetener does get granular but it takes at least a few hours, more often days. The cooling sensation is typical of erythritol though. That is why I prefer using a blend of xylitol, erythritol, and stevia. Stevia can be bitter, xylitol has calories, and erythritol has that weird cooling effect. Combined it minimizes the negatives of each sweetener and makes a great choice.
I tried making it using pyure and mine never thickened until it cooled then it just got solid as a rock. Any suggestions? Can it be used with pyure?
Please tell me it can bc I NEED these in my life!
Sorry for the delayed response. I actually posted your question on my Facebook page hoping another reader had tried it.
Sorry for the delay! I asked on my Facebook and got this response, “The granular pyure does harden like a rock after melted. Use a few drops of the small bottle of the liquid pyure.” I hope that helps!
These are so delicious! The first THM dessert that I have liked! Thanks so much!
This is a great recipe! Took it to a cookout, and people devoured it. I am allergic to eggs, esp the whites. So, I left them out, and they still tasted incredible! Will make again and often! Thanks you for making a favorite THM!
I just took my batch out of the oven…it’s 11pm and I Have been up since 4:30am. They are going to take a while to cool, and I can’t wait up. Looks like an S breakfast for me! 🙂
Also, my husband has been (gently) threatened that I better not wake up to an empty pan!
Thanks for the recipe! Can’t wait to try them!!