Everybody loves magic bars, but have you ever tried Gluten Free Magic Cookies? All the nostalgic flavors you love - coconut, chocolate, and nuts - baked into a chewy, irresistible cookie. These cookies capture that classic magic bar flavor with a soft, slightly crunchy texture that’s simply impossible to resist. And the best part? They’re made with just a few simple pantry staples.

Recipe Ingredient Notes
Shredded Coconut: I use sweetened coconut flakes in my Magic Cookies because they give the cookies a softer, chewier texture. When I tested the recipe with unsweetened coconut, the cookies turned out noticeably drier and more crunchy. If you prefer using unsweetened coconut flakes, the recipe will still work just fine - just expect a crunchier, less chewy and of course less sweet cookie.
Sweetened Condensed Milk: Sweetened condensed milk is cow’s milk with most of the water removed, resulting in a thick, rich milk paste. This is not the same as evaporated milk. If you’re dairy-free, sweetened condensed coconut milk works as a great substitute. (If you’re located in Austria or Germany, look for “Gezuckerte Kondensmilch.”)
Gluten Free Graham Crackers: Gluten free graham crackers help keep the cookies compact and prevent them from spreading too much. Since traditional magic bars are made with a graham cracker crumbs, I wanted to incorporate that familiar flavor here as well. I usually use Schär Gluten Free Honeygrams, but you can absolutely use my homemade gluten free graham crackers in this recipe too.
Peanuts: I use lightly salted peanuts here, but you can easily swap them for other nuts like cashews, almonds, walnuts, pecans, or even a mix of your favorites. I prefer lightly salted nuts because they help cut through the sweetness with a bit of crunch and a toasty, slightly savory flavor. They also add structure, giving the cookies more body.
Peanut Butter: Peanut butter adds richness, moisture, and depth of flavor to magic cookies. It reinforces the nutty notes while making the cookies softer and more cohesive, helping all the mix-ins stick together. My choice of brand is Jif Creamy (or Skippy). Almond Butter or your choice of nut butter alternative like sunflower butter can be used instead.
Chocolate: Magic bars without chocolate? Not possible. I used a chopped dark chocolate bar here, but feel free to swap in your favorite chocolate chips. Butterscotch chips are also a delicious option and add a fun twist.

Recipe Testing Notes
There is nothing new about magic bars or magic cookies. I have seen them float around online for years and after a major pantry clean out and 4 cans of random condensed milk, I figured it's time to make something with them. And Gluten Free Magic Cookies seemed like a perfect way to put them to work.
My first trial was made with gluten free oats, gluten free graham crackers and unsweetened shredded coconut. While the cookies tasted okay, they were lacking flavor and (gasp) sweetness. So I decided to ditch the oats (after all many celiacs stir clear from them) and use sweetened coconut. The cookies were delicious but spread, a lot more than I anticipated.
So I added a bit of peanut butter to work as a "glue" to stick the ingredients more together. Adding a bit helped act like a “glue,” holding everything together and giving the cookies exactly what they needed. The result? Cookies with a lightly crunchy outside and, depending on how long you bake them, just a little bit of a soft center.
How to make Gluten Free Magic Cookies
Gluten Free Magic Cookies are very forgiving. You can adjust them to your likings by using unsweetened coconut, use your favorite kind of nuts and nut butter and even use condensed coconut milk if you are dairy free.
Please allow the Magic Cookie Dough to sit for 10-15 minutes before scooping and baking. This allowed the condensed milk to bind all the ingredients. This will also make the scoopig a lot easier.

- Step 1: Add the peanut butter (or your nut butter of choice) to a microwave-safe bowl and warm it for about 30 seconds. This will make it runnier and much easier to incorporate with the rest of the ingredients.

- Step 2: In the meantime, combine the sweetened coconut, crushed graham crackers (I like to crush them in a zip-top bag with a rolling pin, though clean hands work just as well), roasted peanuts (or your choice of nuts), kosher salt, and chopped dark chocolate in a large bowl. Stir until evenily combined.

- Step 3: Next add the sweetened condensed milk, vanilla extract, and warmed up peanut butter.

- Step 4: With a flexible spatula mix all the ingredients together. Make sure everything is coated with the wet ingredients.
- Step 5: Allow the gluten free magic cookie dough to sit for about 10 minutes while preheating the oven.

- Step 6: Once the oven is fully preheated to 350F and line two baking sheets with parchment paper. Using a large cookie scoop, divide the cookie dough between the two baking sheets. Alternativley use to spoons and spoon little mounds of the cookie dough on the baking sheets. The dough will be sticky, that's just the nature of this recipe. You should get about 14 - 16 cookies. I like to bake 7 or 8 cookies per tray.

- Step 7: Place the cookies in the upper third of your oven and bake one tray at a time at 350°F for 14 - 16 minutes, until golden brown. If your oven runs hot on the bottom, I recommend using two baking sheets stacked together - this gives the cookies a little extra protection so the bottoms don’t burn.
- Step 8: Remove the gluten free magic cookies from the oven and allow them to cool on the sheet tray for a few minutes. Use a small offset knife to release them from the parchment paper and transfer them to a cooling rack to cool.
Storage Recommendations
Make sure to cool the gluten free magic cookies completely before storing them in an airtight container at room temperature. These cookies are best when eaten within 3-4 days. The edges may stay slightly crunchy while the centers remain soft. You can always nuke them in the microwave for a bit to give them a more fresh baked texture again.

Join my Gluten Free Community!
Note about Salt in my Recipes
I use Diamond Kosher Crystal Salt in all of my recipes unless otherwise stated. If use use a different brand or kind of salt in your kitchen please adjust accordingly since some salts can be saltier. If you use Morton’s Kosher Salt please be aware that their salt granules are smaller in size, denser, and crunchier and twice as salty.
Baking in grams
I share my recipes in grams and by weight since baking by weight is the most accurate way to bake. Digital Scales are very affordable and easy to use. You can purchase them on Amazon for less than a set of measuring cups. For small amounts under 10 grams, I like to use this Precision Pocket Scale. Measuring cups are very inaccurate which can cause significant errors when it comes to gluten-free baking or baking in general. Especially since I bake with gluten-free flours which weigh differently than “regular” flours. I do provide some ingredients like spices and leavening agents in measuring spoons. To learn more about Baking with a digital scale, make sure to check out my post about Baking by weight.
Note about Ovens and Oven Temperatures
All my recipes are tested and developed with a conventional oven. I always bake my baked goods on the rack placed in the MIDDLE of my oven. This way the heat coming from the bottom will not burn my baked goods.
If you are baking with convection (fan-forced), please adjust the recipes accordingly. Convection oven can cause baked goods to dry out quickly and still be raw inside. Since takes at least 15-20 minutes for a standard American Oven to be fully preheated. I highly recommend investing in an Oven Thermometer.
Substitutions and Modifications
Any dietary or ingredient modifications/substitutions to this recipe may alter the end result in appearance and taste. I test my recipes several times as published in this post and The Gluten Free Austrian Blog is not responsible for the outcome of any recipe you find on our website.
More Gluten Free Cookie Recipes to try
📖 Recipe
Gluten Free Magic Cookies
Enjoy the classic taste of magic bars in these Gluten Free Magic Cookies - chewy, crunchy, and made with just a few pantry staples.
Ingredients
Gluten Free Magic Cookies
- 60 grams peanut butter
- 130 grams sweetened, shredded coconut
- 120 grams crushed gluten free graham crackers (I use 2 sleeves of Schar Honeygrams)
- 100 grams lightly salted peanuts
- 100 grams dark chocolate (chips or a chopped bar)
- ¼ teaspoon kosher salt
- 1 - 14oz can sweetened condensed milk
- 1 teaspoon vanilla extract
Instructions
Gluten Free Magic Cookies
Gluten Free Magic Cookies are very forgiving. You can adjust them to your likings by using unsweetened coconut, use your favorite kind of nuts and nut butter and even use condensed coconut milk if you are dairy free.
- Add the peanut butter (or your nut butter of choice) to a microwave-safe bowl and warm for about 30 seconds. This makes it runnier and easier to mix.
- Meanwhile, in a large bowl, combine the sweetened coconut, crushed graham crackers (I crush them in a zip-top bag with a rolling pin, or just use clean hands), roasted peanuts (or your choice of nuts), kosher salt, and chopped dark chocolate. Stir to combine evenly.
- Add the sweetened condensed milk, vanilla extract, and warmed peanut butter to the dry ingredients.
- Using a flexible spatula, mix everything together until all ingredients are coated in the wet mixture.
- Let the cookie dough sit for about 10 minutes while preheating the oven.
- Preheat the oven to 350°F and line two baking sheets with parchment paper. Using a large cookie scoop (or two spoons), divide the dough into mounds on the sheets. The dough will be sticky - that’s normal. You should get about 14 - 16 cookies, or 7 - 8 per tray.
- Place the cookies in the upper third of the oven and bake one tray at a time for 14 - 16 minutes, until golden brown. If your oven runs hot on the bottom, stack two baking sheets for extra protection.
- Remove the cookies from the oven and let them cool on the baking sheet for a few minutes. Use a small offset knife to release them from the parchment, then transfer to a cooling rack to cool completely.
Notes
Shredded Coconut: I use sweetened coconut for a softer, chewier cookie. Unsweetened works too, but the cookies will be drier, crunchier, and less sweet.
Sweetened Condensed Milk: Dairy-free? Use sweetened condensed coconut milk. (In Austria/Germany, look for “Gezuckerte Kondensmilch.”)
Gluten Free Graham Crackers: I use Schär Honeygrams or my homemade gluten free graham crackers.
Peanuts: Lightly salted peanuts add crunch, flavor, and structure. Swap for your favorite nuts or a mix.
Peanut Butter: Use your favorite nut butter or alternatives like almond or sunflower butter.
Nutrition Information:
Yield:
16Serving Size:
1Amount Per Serving: Calories: 168
Calories are a guestimate and randomly generated.











Kristie says
I typically love all your recipes. I’m not sure what happened to me with this one. I measured everything with my scale, used sweetened condensed coconut milk which you said was fine. They turned out as flat as crackers, a greasy mess. I put in frig to see if that helped the dough but it didn’t.
Daniela says
would you mind sharing what kind of coconut flakes you used and what kind of gluten free graham crackers? thank you.