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.









Can you sub more almond flour to replace the coconut flour?
Yes
I have found my favorite cookie from my pre keto days, (now re-made!) and I fear my life will be enriched forevermore! Bless you!
On my list to make this weekend!
These taste just like the ones my mom used to make when I was growing up! I love that they healthier for you but just as delicious as the ones I remember. My family loves these and they don’t last when I make them.
I tried this recipe because the ingredient list was basic. I didn’t have to go buy things I’ll probably never use again. I used 1/8c monk/erythrotol to sweeten the HWC which turned out amazing.The crust was too crumbly, plain tasting and dry though. Any suggestions how I can salvage them because I made a double recipe and I’m not liking the crust and I’ll have to eat this with a spoon. Thanks
It holds together after chilling. The crust is just basic because you should eat it with the filling. On its own it is plain.
Try making low carb ice cream and using it as an ice cream topping. I’ve done that with lots of crumbly low carb treats.
wondering what you would sub for the heavy cream? trying to keep it dairy free…Absolutely delicious sweet treat though and even better no one knew they were paleo/keto…
Coconut cream works well! I use it in the cookie version of this: joyfilledeats.com/five-minute-magic-cookies
Absolutely delicious sweet treat..and even better no one knew they were paleo/keto
Can these be frozen?
Yes
Do NOT use 1.5 the amount of Swerve or Lakanto!!! Use HALF the amount. I subbed Swerve and used just exactly what the original recipe calls for, and it still was too sweet and burned our throats.🥴 Otherwise, DELICIOUS recipe!! 😋
Exactly how much did you use? Many people do the math wrong. I get a lot of comments asking if they should use 1 1/2 cups of swerve instead of 1/2 cup of my sweetener. The correct amount would only be 3/4 cup.
Well I actually used 1/2 cup, just like the recipe says. (I didn’t notice your adjustments in the notes until after I made them.) But even with that amount it was too sweet and slightly burns our throats (the typical result in too much sweetener is used). Even my kids say they are too sweet.😄 My friend who uses Lakanto and Swerve as well said she used half the amount and they turned out just right. I honestly can’t imagine what these would taste like if I used 3/4 cup! I don’t think we would be able to eat them.🙃🙂
Thanks for letting me know. I’ll make a note on that.
*the typical result WHEN too much sweetener is used 🙂
Your recipe looks good but you mention to Drizzle Condensed milk? Isn’t that full of carbs?
No, you make homemade sugar free condensed milk: https://joyfilledeats.com/sweetened-condensed-milk/
Hello. When you calculate the carbohydrates in recipes, do you include the full carbs or net carbs from the ingredients? I’m tracking total carbohydrates and looking for low carb recipes. Any tips are appreciated.
When you look at the nutrition table it says carbs: 4 and fiber: 2. So this has 4 total carbs per serving. To get net carbs you just subtract 4-2=2 so it has 2 net carbs.
in the paragraphs above the reciepes the only baking yoy mention is the crust then yoy say to assemble the layers and refrigerate but in the reciepe below that it says to bake the crust assemble the layers then to bale it again for 25 mins. so which is it? it seems like you would only bake the crust not the layers of topping with the condensed milk I cant imagine being g able to bake it it would turn out bad.
You bake the whole thing. The condensed milk sets the layers. After baking you can chill the bars to help set the crust.
This is one of my favorite bar recipe. It is so versatile and easy. I double the recipe and put cranraisins, different nuts, different chip flavors and coconut. I store them in the refrigerator for a fast grab snack. I have even been know to eat them for breakfast. ❤️
I plan to make these and wondered how long they can be stored? Do I keep them in the fridge? and for how long? I would like to take on a little anniversary get away to have for evening treat. Thank you!
They are fine out of the fridge for a day or two. I do generally keep all low-carb baked goods in the refrigerator. In the fridge, they last for 2-3 weeks or longer.
Has anyone used THM baking blend in this recipe? Can’t wait to try them!
Yes, use a little less than the amounts listed.
Hey there! Mine did not turn out nearly as pretty as yours; when I poured the condensed milk over top (it was still very warm, but I let it cool for a solid 30 minutes before adding the egg yolks and using), it melted many of the chocolate chips such that the top after cooking resembles melted chocolate or a brownie more than magic cookie bars…..They haven’t cooled completely yet so I can’t comment on the taste, but any ideas to fix this so they look prettier for next time? Did you perhaps sprinkle on the chocolate chips first and then other items on top so there is a buffer between the chocolate chips and the condensed milk?
I’m surprised it would’ve melted the chocolate chips after cooling for a full 30 minutes. Next time you could add the chocolate chips to the top after pouring the condensed milk over the coconut and nuts.
Hi there, I’m fairly new to your recipes, so far I’ve loved them. I’m wondering though, you list a carb count but not a net carbs counts, have you not worded it correctly or do you just avoid listing net carbs? I need to know for calculating my intake of net carbs.
Thanks.
You just subtract the fiber from the total carbs to get net carbs. These have 2 net carbs.