Line an 8 × 8-inch pan with parchment paper and lightly grease it.
Preheat the oven to 350°F (175°C).
Melt the butter and chocolate until smooth.
Whisk in the sugar until glossy.
Beat in the eggs one at a time, then add the vanilla.
Fold together the flour, cocoa powder, and salt, then gently fold them into the batter. Add chocolate chips if using.
Spread the batter evenly into the prepared pan.
Bake for 25–30 minutes, until a toothpick comes out with moist crumbs.
Cool in the pan for 1 hour before removing.
Slice into squares and serve.