Prep the pan and oven: Heat the oven to 350°F (175°C). Line a 9x13-inch metal baking pan with parchment, leaving overhang for easy lifting.
Lightly grease.
Melt the butter: Melt butter and let it cool for 5–10 minutes so it’s warm, not hot. This helps keep the bars thick and not greasy.
Whisk the sugars and butter: In a large bowl, whisk melted butter with brown and granulated sugar until glossy and smooth, about 30 seconds.
Add eggs and vanilla: Whisk in eggs one at a time, then vanilla, until fully combined and slightly thick.
Combine dry ingredients: In a separate bowl, whisk flour, baking soda, and salt. This prevents clumps and ensures even rise.
Mix the dough: Add the dry ingredients to the wet.
Stir with a spatula until just combined. Do not overmix.
Fold in chocolate: Stir in chocolate chips (and nuts if using), reserving a small handful to press on top for a bakery look.
Spread and top: Scrape the dough into the pan and spread evenly to the corners. Press in the reserved chips.
For extra flavor, sprinkle a pinch of flaky salt.
Bake: Bake 22–28 minutes, until edges are set and golden and the center looks slightly underbaked with a soft jiggle. A toothpick should come out with moist crumbs, not wet batter.
Cool and slice: Cool in the pan on a rack for at least 20–30 minutes to set. Lift out with parchment and cut into bars.
For clean edges, cool fully before slicing.