Classic magic bars have always been one of my favorite holiday treats.
The traditional version is loaded with regular sugar and graham crackers, which does not work if you eat keto.

That is why I wanted to make these keto magic cookie bars.
They give you the exact same rich, gooey layers of chocolate, coconut, and nuts without the sugar spike.
Making them low carb and keto friendly means you can enjoy a real dessert while staying on track with your daily goals.
Why You’ll Love This Recipe
Incredible Textures – You get a buttery crisp crust, gooey chocolate, chewy coconut, and crunchy pecans in every single bite.
Rich Condensed Milk – The homemade allulose milk reduces into a thick, sticky syrup that holds everything together beautifully.

Authentic Nostalgic Flavor – These taste just like traditional magic cookie bars, so you never have to miss your childhood favorite.
Total Crowd Pleaser – Even your friends who do not follow a low carb diet will love these sweet, decadent bars.
Recipe Ingredients
For the Crust
- 1 1/2 cups Almond Flour
- 1/4 cup Powdered Erythritol
- 5 tbsp Butter, Melted
- 1/4 tsp Salt
For the Keto Condensed Milk
- 1 1/4 cups Heavy Cream
- 1/3 cup Powdered Allulose
- 2 tbsp Butter
- 1 tsp Vanilla Extract
For the Layers
- 3/4 cup Sugar Free Chocolate Chips
- 3/4 cup Unsweetened Shredded Coconut
- 1/2 cup Chopped Pecans
How To Make
Step 1
Preheat the oven to 350°F. Line an 8×8-inch baking pan with parchment paper, leaving some overhang on two sides for easy lifting.
Step 2
Make the keto condensed milk. Combine the heavy cream, allulose and 2 tbsp butter in a saucepan over medium heat and bring to a gentle simmer. Lower the heat and cook for 20 to 25 minutes, stirring often, until reduced by about half and thick enough to coat a spoon.
Stir in the vanilla and set aside. It will thicken more as it cools.
Step 3
While the milk simmers, stir together the almond flour, erythritol, salt and melted butter until it looks like wet sand. Press firmly into the pan and bake for 10 minutes, until the edges are lightly golden.
Step 4
Reduce the oven to 325°F. Scatter the chocolate chips over the warm crust, followed by the shredded coconut and the pecans in even layers.
Step 5
Slowly drizzle the condensed milk over the entire surface, making sure it reaches the corners.
Step 6
Bake for 18 to 22 minutes, until the coconut is deep golden and the edges are bubbling. If the top browns too fast, cover loosely with foil.
Step 7
Cool in the pan to room temperature, then chill for 2 hours until firm. Lift out and slice into 16 bars.

Tips
Stick With Allulose for the Milk
I recommend using powdered allulose instead of erythritol for the condensed milk.
Erythritol tends to crystallize as it cools down, which leaves the bars with a crunchy, gritty texture.
Allulose melts down completely and stays soft. It gives you that genuine gooey, sticky caramel texture you want in a magic bar.
Pack the Crust Down Firmly
You’ll get the best results if you use the flat bottom of a measuring cup or drinking glass to press the crust into the pan.

Almond flour has no gluten, so loose crumbs will not stick together on their own.
Pressing it down hard creates a solid base that will hold together neatly once you slice the bars.
Keep the Heat Low for the Milk
From my experience, rushing the condensed milk over high heat will ruin the texture.
Heavy cream can easily scorch on the bottom of the saucepan or separate into butterfat if it gets too hot.
Keep your stove on a gentle simmer and stir often with a rubber spatula, making sure to scrape the corners of the pan.
More Recipes
- Keto Almond Joy Bars
- Keto German Chocolate Cake Bars
- Keto Millionaire Shortbread Bars
- Keto Samoa Cookie Bars
- Low Carb Chocolate Coconut Bars
Frequently Asked Questions
Can I make these magic cookie bars nut free?
Yes, you can easily make this recipe nut free by replacing the almond flour with finely ground sunflower seed flour in a one to one ratio.
For the crunchy topping layer, simply swap out the chopped pecans for toasted sunflower seeds or pumpkin seeds.
Keto Magic Cookie Bars
Ingredients
For the Crust
- 1 1/2 cups Almond Flour
- 1/4 cup Powdered Erythritol
- 5 tbsp Butter, Melted
- 1/4 tsp Salt
For the Keto Condensed Milk
- 1 1/4 cups Heavy Cream
- 1/3 cup Powdered Allulose
- 2 tbsp Butter
- 1 tsp Vanilla Extract
For the Layers
- 3/4 cup Sugar Free Chocolate Chips
- 3/4 cup Unsweetened Shredded Coconut
- 1/2 cup Chopped Pecans
Instructions
- Preheat the oven to 350°F. Line an 8x8-inch baking pan with parchment paper, leaving some overhang on two sides for easy lifting.
- Make the keto condensed milk. Combine the heavy cream, allulose and 2 tbsp butter in a saucepan over medium heat and bring to a gentle simmer. Lower the heat and cook for 20 to 25 minutes, stirring often, until reduced by about half and thick enough to coat a spoon. Stir in the vanilla and set aside. It will thicken more as it cools.
- While the milk simmers, stir together the almond flour, erythritol, salt and melted butter until it looks like wet sand. Press firmly into the pan and bake for 10 minutes, until the edges are lightly golden.
- Reduce the oven to 325°F. Scatter the chocolate chips over the warm crust, followed by the shredded coconut and the pecans in even layers.
- Slowly drizzle the condensed milk over the entire surface, making sure it reaches the corners.
- Bake for 18 to 22 minutes, until the coconut is deep golden and the edges are bubbling. If the top browns too fast, cover loosely with foil.
- Cool in the pan to room temperature, then chill for 2 hours until firm. Lift out and slice into 16 bars.