Magic Bars Recipe

Coconut, chocolate and pecans combine for this magical treat

You may know them as seven-layer bars or magic bars, but we just call them our favorite. We update the classic by turning the graham cracker crust into a graham cracker shortbread that's then covered in sweetened condensed milk, coconut, pecans and chocolate. They're a nostalgic treat that are a hit with all ages.

While you may think the coconut or chocolate steals the show, the sweetened condensed milk is the real star of these bars. If you want to take these magic bars to supernatural heights, cook the condensed milk into a caramel before baking. Do this by covering an unopened can of sweetened condensed milk with at least 2 inches of water in a pot and boiling for 2½ hours. Be sure you're adding water to the pot as needed to always keep the can covered. Let the can cool then open it to reveal the rich, caramelized milk (editor's note: If you take this route, the baking time will remain the same). Looks like magic to us.

Check out our favorite cookie and bar recipes.

Recipe from the Tasting Table Test Kitchen

Magic Bars
4.8 from 54 ratings
In this version of the classic magic bar, sweetened condensed milk, coconut, pecans and semisweet chocolate top a graham cracker shortbread.
Prep Time
Cook Time
square tray
Total time: 50 minutes
  • 1¼ cups all-purpose flour
  • 1 cup graham cracker crumbs
  • 1 teaspoon kosher salt
  • 2 sticks unsalted butter, softened
  • ¼ cup granulated sugar
  • ¾ cup sweetened condensed milk
  • 1 cup dried coconut flakes
  • ½ cup pecans, roughly chopped
  • ½ cup semisweet chocolate chips
  • Flaky sea salt, for garnish
  1. Preheat the oven to 350º. In a medium bowl, whisk together the flour, graham cracker crumbs and salt to incorporate.
  2. In the bowl of a stand mixer fitted with the paddle attachment, cream the butter and sugar until light and fluffy, 2 minutes. Add the flour mixture and mix until a dough comes together. Transfer to a parchment-lined 9-inch square pan and, using an offset spatula, spread in an even layer.
  3. Bake until lightly golden, 15 minutes, then remove from the oven. Pour the sweetened condensed milk over the crust and spread evenly with an offset spatula.
  4. In a medium bowl, mix together the coconut, pecans and chocolate chips, then scatter the mixture over the condensed milk and lightly press into the milk. Garnish with flaky sea salt.
  5. Bake until the coconut is golden brown, 20 to 25 minutes, then remove from the oven and let cool completely before cutting and serving.
Calories per Serving 526
Total Fat 37.6 g
Saturated Fat 22.1 g
Trans Fat 0.9 g
Cholesterol 62.7 mg
Total Carbohydrates 45.4 g
Dietary Fiber 3.3 g
Total Sugars 26.1 g
Sodium 242.8 mg
Protein 6.0 g
The information shown is Edamam’s estimate based on available ingredients and preparation. It should not be considered a substitute for a professional nutritionist’s advice.
Rate this recipe