Prep the pan: Heat oven to 350°F (175°C). Line an 8-inch square pan with parchment, leaving a little overhang for easy lifting.
Lightly grease the parchment.
Toast the walnuts: Spread walnuts on a sheet pan and toast for 6–8 minutes until fragrant. Cool, then chop. This step boosts flavor and keeps them crunchy.
Melt butter and chocolate: In a heatproof bowl set over a pot of barely simmering water, melt the butter and dark chocolate, stirring until smooth.
Remove from heat and cool 5 minutes. You can also use the microwave in 20–30 second bursts, stirring between each.
Whisk in sugars: Add granulated and brown sugars to the warm chocolate mixture. Whisk until glossy and combined.
The warmth helps dissolve the sugar a bit and gives you that shiny top later.
Add eggs and vanilla: Whisk in eggs one at a time, fully blending after each. Stir in vanilla. Beat for about 30 seconds until the batter looks thick and satiny.
Combine dry ingredients: In a small bowl, whisk flour, cocoa powder, kosher salt, and espresso powder (if using).
This prevents cocoa clumps.
Fold to finish the batter: Using a spatula, fold the dry ingredients into the wet just until you see no dry streaks. Do not overmix. Fold in most of the chopped walnuts, saving a handful for the top.
Pan and top: Spread batter evenly in the prepared pan.
Sprinkle remaining walnuts on top. If you like, add a small pinch of flaky salt.
Bake: Bake 24–28 minutes. Start checking at 24.
The edges should be set and slightly pulled from the pan; a toothpick in the center should come out with moist crumbs, not wet batter.
Cool and set: Let brownies cool in the pan on a rack for at least 1 hour. For the cleanest slices and peak fudginess, chill 30 minutes after they reach room temperature, then lift and cut.
Slice smart: Use a sharp knife, wiping between cuts. Aim for 9 large squares or 16 smaller ones.