Gluten-free magic cookie bars layer a buttery cookie-crumb crust with sweetened condensed milk, chocolate, coconut, and nuts. The condensed milk binds the toppings as they bake, making a rich, chewy bar without complicated mixing; using certified gluten-free ingredients keeps the classic treat suitable for a gluten-free kitchen.
Ingredients
- 6 tablespoons (85 g) unsalted butter, melted, plus a little for greasing the pan
- 1 ½ cups (about 165 g) gluten-free graham cracker crumbs, made from certified gluten-free crackers
- 1 can (14 ounces/397 g) sweetened condensed milk (not evaporated milk)
- 1 cup (170 g) semisweet chocolate chips, certified gluten-free if needed
- 1 cup (about 85 g) unsweetened or sweetened shredded coconut
- ¾ cup (85 g) chopped pecans or walnuts
- ¼ teaspoon fine salt, if your crackers and nuts are unsalted
Instructions
- Heat the oven to 350°F (175°C). Line an 8-inch (20 cm) square metal baking pan with parchment paper, leaving overhang on two sides to lift out the bars. Lightly grease the pan or parchment. Check that your oven rack is in the center position.
- Stir the melted butter into the graham cracker crumbs until the crumbs look evenly damp and hold together when squeezed. Mix in the salt if using. Tip the mixture into the pan and press it into a compact, even layer, reaching the corners. A flat-bottomed measuring cup helps make a firm crust that is less likely to crumble.
- Pour the sweetened condensed milk slowly over the crust. Spread it gently with a spatula, taking care not to disturb the crumbs. Sprinkle the chocolate chips evenly over the milk, followed by the coconut and chopped nuts. Press the toppings down lightly with your fingertips or the back of a spoon so they adhere, but do not pack them hard.
- Bake for 25 to 30 minutes, until the edges are golden brown and the coconut has toasted in spots. The middle may still look a little soft; it firms as it cools. If the coconut browns too quickly, loosely cover the pan with foil for the remaining baking time. Do not wait for the center to become firm in the oven, which can make the bars dry.
- Set the pan on a wire rack and cool completely, at least 2 hours. For especially neat slices, refrigerate the cooled pan for 30 to 60 minutes. Lift the slab out using the parchment, place it on a cutting board, and cut into 16 squares with a sharp knife. Wipe the knife between cuts if the chocolate sticks.
Tips
- Check every package. Gluten-free labeling can vary, and ingredients such as graham crackers, chocolate chips, and nuts may be processed on shared equipment. For someone with celiac disease or a serious sensitivity, choose products labeled gluten-free and avoid cross-contact from utensils, pans, and work surfaces.
- Measure crumbs by weight when possible. Cracker brands vary in density. Aim for about 165 g of crumbs; if using cups, spoon the crumbs into the measuring cup rather than packing them down. The mixture should be damp and pressable, not greasy.
- Let the bars cool before cutting. Warm condensed milk and melted chocolate are soft, so cutting too soon can make the layers slide apart. Chill the fully cooled bars briefly for cleaner edges, then bring them back toward room temperature for a softer bite.
- Use parchment and a suitable pan. Parchment makes removal easier, and a metal pan browns the crust predictably. A glass pan may take a little longer; judge doneness by the browned edges and toasted coconut rather than relying only on the clock.
Serving Suggestions
Serve the bars at room temperature for a soft, chewy texture, or slightly chilled if you prefer a firmer bite. They pair well with coffee, tea, or a glass of cold milk. For dessert, add a small scoop of vanilla ice cream and fresh berries; the bars are rich, so modest squares are satisfying. If serving a group, cut them just before arranging on a platter and keep the platter out of direct sun or heat.
Variations
Swap the pecans for walnuts, almonds, or pumpkin seeds, keeping the quantity about the same. For a nut-free version, omit the nuts and add another ¾ cup of chocolate chips, gluten-free pretzel pieces, or sunflower seeds; check all packages for gluten and allergy statements. Use dark, milk, or white chocolate chips, or combine two kinds. Toasted coconut gives a deeper flavor, while sweetened coconut makes the bars sweeter. You can also use gluten-free vanilla wafer crumbs in place of graham crumbs, measured to the same weight. If your crackers are already salty, skip the added salt.
Storage and Reheating
Once fully cool, store the bars in an airtight container at room temperature for up to 3 days, or refrigerate them for up to 1 week. Separate layers with parchment to prevent sticking. Bring refrigerated bars to room temperature for about 15 to 20 minutes before serving if you want the chocolate and filling to soften. These bars are usually served at room temperature, so reheating is unnecessary; if desired, warm an individual bar for about 5 seconds in the microwave, checking carefully so the chocolate does not become too hot.
For longer storage, freeze cut bars in a single layer until firm, then transfer them to a freezer-safe airtight container with parchment between layers. Freeze for up to 2 months for best quality. Thaw in the refrigerator overnight or on the counter for about 1 to 2 hours. Do not leave perishable food out for more than 2 hours at room temperature, or 1 hour in temperatures above 90°F (32°C); refrigerate leftovers promptly.
Related
Frequently Asked Questions
Are magic cookie bars naturally gluten-free?
No. Traditional recipes often use wheat-based graham crackers, and some packaged toppings may have gluten cross-contact. Choose gluten-free crumbs or crackers and verify that the other ingredients meet your needs.
Can I use a different pan size?
An 8-inch square pan gives thick bars and the stated baking time. A 9-inch square pan makes thinner bars and may finish a few minutes sooner, so start checking at about 22 minutes. A larger pan spreads the layers more thinly; avoid changing the recipe to a very large pan without adjusting the bake time.
Can I make these without nuts?
Yes. Leave out the nuts and replace them with an equal volume of extra chocolate chips, seeds, or gluten-free pretzel pieces. For an allergy-safe serving, also check for nut warnings on the chocolate, coconut, and crumb packages and prevent contact with shared equipment.
Why are my bars falling apart?
The crust may not have been pressed firmly enough, or the bars may have been cut before cooling. Make sure the crumbs are evenly moistened, compact the crust, and let the pan cool completely before slicing. Chilling briefly helps if the bars are still soft.
Can I make them ahead?
Yes. Bake them a day ahead, cool completely, and store covered at room temperature or in the refrigerator. You can also freeze the cut bars for up to 2 months; thaw before serving for the best chewy texture.
How can I tell when they are done?
Look for golden edges, a set-looking topping, and coconut toasted in spots after about 25 to 30 minutes. The center can remain slightly soft while hot, but it should not look liquid or slosh when the pan is gently moved. Cooling finishes the setting process.