Preheat oven to 350°F (175°C). Grease an 8×8-inch baking pan or line with parchment paper.
In a medium saucepan, melt butter over low heat. Remove from heat and stir in sugar, eggs, and vanilla until smooth.
Sift in cocoa powder, flour, salt, and baking powder. Stir until just combined. Fold in chocolate chips or nuts if using.
Pour batter into prepared pan and smooth the top.
Bake 20–25 minutes, or until a toothpick inserted in the center comes out with a few moist crumbs.
Let cool before cutting into squares and serving.