Magic cookie bars, also called seven layer bars or Hello Dolly bars, are a cookie tray staple: a graham cracker crust, layers of chocolate chips, butterscotch chips, nuts, and coconut, all glued together with a can of sweetened condensed milk. For an allergy family, almost every layer is a problem. The crust is wheat and butter, the condensed milk is dairy, butterscotch chips usually contain milk, and the nuts are the point of the original. This version rebuilds each layer. A pressed-in brown sugar and cinnamon crust made with rice and oat flour tastes like graham crackers. Homemade sweetened condensed coconut milk holds everything together. Crispy rice cereal brings the crunch nuts used to provide, and dried cranberries replace the butterscotch with a pop of Christmas red.
Dairy-free magic bars rebuild each classic layer. A pressed crust of rice flour, oat flour, brown sugar, cinnamon and coconut oil stands in for graham crackers and butter, homemade sweetened condensed coconut milk replaces the canned dairy kind, and crispy rice cereal brings the crunch nuts usually add. Dried cranberries take the place of butterscotch chips.
The result is chewy, gooey, and crunchy at once, like the original, and it cuts into neat squares for cookie boxes. These Top Nine Free bars are made without milk, eggs, wheat, soy, peanuts, tree nuts, fish, shellfish and sesame; they do contain coconut.
Made without: peanuts, tree nuts, milk, eggs, wheat, soy, fish, shellfish, sesame. Contains coconut.
Why You’ll Love This Recipe
- All the layers: crust, chocolate, crunch, fruit, and toasted coconut in every bite.
- No nuts at all: crispy rice cereal gives the crunch.
- One pan, big batch: 24 bars from a 9×13 pan, with no rolling or shaping.
- Freezes well: make them weeks ahead for cookie boxes and exchanges.
How It Works Without Dairy, Wheat, or Nuts
Sweetened condensed milk is just milk and sugar cooked down until thick. Coconut milk cooks down the same way: simmered with sugar for 35 to 45 minutes, it reduces to a thick, faintly golden syrup that bakes into a chewy caramel-like layer, binding the toppings to the crust. The crust doesn’t need crackers. Rice flour, oat flour, brown sugar, cinnamon, and melted coconut oil press into the pan and bake into a crisp, sandy base with the warm, toasty taste of graham crackers. A short par-bake keeps it crisp under the wet layers. Nuts in the original add crunch and a roasted flavor; crispy rice cereal handles the crunch, and the toasted coconut on top adds the roasted note.
Magic cookie bar layers, swapped
| Classic layer | This version |
|---|---|
| Butter and graham cracker crumbs | Pressed crust of rice flour, oat flour, brown sugar, cinnamon and coconut oil |
| Chocolate chips | Dairy-free semisweet chips |
| Butterscotch chips | Dried cranberries |
| Chopped nuts | Crispy rice cereal (labeled gluten-free) |
| Sweetened condensed milk | Homemade sweetened condensed coconut milk |
| Shredded coconut | Sweetened shredded coconut, toasted on top |
Ingredients & Swap Ideas
- Condensed coconut milk: 2 cans (400 ml each) full-fat coconut milk, 2/3 cup (130 g) sugar, and a pinch of salt. You can use one 11-ounce (320 g) can of store-bought sweetened condensed coconut milk instead; check the label for added ingredients.
- Crust: 1 cup (160 g) white rice flour, 1/2 cup (50 g) certified gluten-free oat flour (regular oats can pick up barley), 1/2 cup (100 g) brown sugar, cinnamon, baking soda, salt, 1/3 cup (70 g) melted refined coconut oil, maple syrup, and vanilla. As a shortcut, crush about 2 cups of our homemade graham crackers (no wheat) and mix with 1/4 cup melted coconut oil.
- Chocolate chips: 1 cup (170 g) dairy-free semisweet chips. Many chips contain milk or soy lecithin, so read the label. Mini chips spread more evenly.
- Crispy rice cereal: 1 1/2 cups (40 g). Many popular brands contain barley malt, so choose one labeled gluten-free.
- Dried cranberries: 1/2 cup (60 g). Some are coated in sunflower or other seed oils; check the label. Chopped dried cherries or raisins work too.
- Coconut: 1 1/3 cups (100 g) sweetened shredded coconut. Unsweetened works if you prefer the bars less sweet.
- About the fat: coconut is in three layers, so a coconut-free version hasn’t been worked out. You can make the crust with light-tasting olive oil (light means refined and mild, not fewer calories). Skip butter substitutes and margarine, and grease the pan with coconut oil, not cooking spray.
Kitchen Equipment
- 9×13-inch (23×33 cm) metal baking pan
- Parchment paper for a sling
- Heavy 3-quart saucepan (the coconut milk foams as it boils)
- Sharp knife
Step-by-Step Tips
- Reduce the coconut milk far enough. You want about 1 1/3 cups that coats a spoon thickly. If it’s thin, the bars stay wet in the middle. Make it a day ahead to save time.
- Press the crust firmly. Use the flat bottom of a measuring cup to pack it evenly into the corners. A loose crust crumbles when you cut.
- Layer onto the hot crust. The chocolate chips soften slightly and anchor to the base.
- Drizzle evenly. Get the condensed milk into the corners and edges so every bar is held together. Then add the coconut and press lightly.
- Bake until the edges bubble. The coconut should be golden at the edges and the condensed milk bubbling along the sides. The center firms as it cools.
- Chill before cutting. Cool 1 hour, then refrigerate 1 hour. Wipe the knife between cuts for clean edges.

Magic Cookie Bars (Seven Layer Bars), No Nuts
Ingredients
Equipment
Method
- Make the condensed coconut milk (up to 1 week ahead): whisk the coconut milk, sugar, and salt in the saucepan and bring to a boil over medium heat. Simmer, stirring every few minutes and more often near the end, 35 to 45 minutes, until reduced to about 1 1/3 cups (it should coat a spoon thickly, like condensed milk, and turn faintly golden). Cool to lukewarm; it thickens as it cools.
- Heat the oven to 350°F (175°C). Lightly grease the pan with coconut oil and line it with a parchment sling that overhangs two sides.
- For the crust, whisk the rice flour, oat flour, brown sugar, cinnamon, baking soda, and salt. Stir in the melted coconut oil, maple syrup, and vanilla until it looks like damp, clumpy sand. Press firmly and evenly into the pan with the bottom of a measuring cup.
- Bake the crust 12 to 14 minutes, until it smells toasty, looks dry, and is just golden at the edges. Leave the oven on.
- Sprinkle the chocolate chips evenly over the hot crust, then the crispy rice cereal and dried cranberries. Drizzle the condensed coconut milk evenly over everything, getting it into the corners, then scatter the shredded coconut on top and press lightly with your palm.
- Bake 22 to 28 minutes, until the coconut is toasted golden at the edges and the condensed milk is bubbling around the sides of the pan. The center will still look soft.
- Cool completely in the pan on a rack, about 1 hour, then chill 1 hour so the layers set. Lift out with the parchment and cut into 24 bars with a sharp knife wiped clean between cuts.
Notes
Troubleshooting
- Bars fall apart: they were cut warm, or the condensed milk didn’t reach that area. Chill longer, and drizzle all the way to the edges next time.
- Soggy center: the condensed coconut milk wasn’t reduced enough. Bake 5 minutes longer, and cook it down further next batch.
- Coconut browning too fast: lay a sheet of foil loosely over the pan for the last 5 to 8 minutes.
- Crust is hard: it was over-baked before the toppings went on. Pull it when it’s just golden at the edges.
Make-Ahead, Freezing & Gifting
Magic cookie bars keep 3 days in an airtight container at cool room temperature or a week in the fridge, where they stay firmer and neater. To freeze, set the cut bars on a tray until firm, then stack them with parchment between layers in a tin or freezer container for up to 3 months. Thaw in the fridge or at room temperature. For cookie boxes and gifts, pack them in paper liners or between parchment in a tin, and keep the tin cool until you hand it off. The condensed coconut milk keeps a week in the fridge on its own, so you can spread the work over two days.
More Christmas Bars and Cookies
Browse the whole cookie tray in our Christmas recipes. If you like coconut, try the coconut macaroons with no eggs, and for another layered bar, the millionaire shortbread bars use a similar coconut milk caramel. Round out the tray with shortbread cookies without butter and a few squares of old-fashioned dairy-free fudge.
FAQ
Why are they called seven layer bars?
The classic version counts butter, graham crumbs, chocolate chips, butterscotch chips, nuts, coconut, and condensed milk as seven layers. This version has six: crust, chocolate, crispy rice, cranberries, condensed coconut milk, and coconut.
Can I use butterscotch chips?
Most butterscotch chips contain milk, and many also contain other allergens. If you find one that fits your family’s needs after reading the label, use it in place of the cranberries.
Do magic cookie bars need to be refrigerated?
Not for the first few days, but they cut more cleanly and hold their shape better when chilled. Refrigerate them if your kitchen is warm or you want them to keep longer.
Can I halve the recipe?
Yes. Halve everything and bake in an 8×8-inch (20×20 cm) pan. Start checking the topping a few minutes early.
What replaces sweetened condensed milk in dairy-free magic bars?
Homemade sweetened condensed coconut milk. Two cans of full-fat coconut milk simmer with sugar and a pinch of salt for 35 to 45 minutes, until about 1 1/3 cups of thick syrup remain. A can of store-bought sweetened condensed coconut milk works too; read the label.
Can you make magic cookie bars without nuts?
Yes. Crispy rice cereal gives the crunch the nuts usually provide, and the toasted coconut on top adds the roasted flavor. This recipe uses no peanuts or tree nuts at all.
Do these work for a nut-free classroom party or cookie exchange?
They’re made without peanuts and tree nuts and travel well in a tin, but they do contain coconut. Check the school’s or host’s food policy and read every label before you bake.
A note before you cook: These recipes are ideas and suggestions, not medical or dietary advice. As with any recipe or ingredient, it is each reader’s responsibility to confirm what they can and cannot eat, read every ingredient label, and source quality ingredients that fit their own needs. Ingredient formulations change, so always check the package you’re using.
