Preheat oven to 350°F (175°C)
Line an 8×8-inch baking pan with parchment paper or grease it well
Melt 1/2 cup unsalted butter
Whisk in 1 cup granulated sugar
Add 2 large eggs
Add 1 teaspoon vanilla extract
Mix until smooth
In a separate bowl, combine 1/2 cup all-purpose flour, 1/3 cup unsweetened cocoa powder, 1/4 teaspoon salt, and 1/4 teaspoon baking powder
Stir dry ingredients into the wet mixture
Fold in 1/2 cup chocolate chips or chopped chocolate if desired
Spread batter evenly into the prepared pan
Bake for 20 to 25 minutes
Remove when the center is set but still slightly soft
Cool completely before cutting
Slice into squares and serve
