Preheat your oven to 350°F (175°C). Grease a 9x13 inch baking pan or line it with parchment paper.
In a mixing bowl, combine the granulated sugar, brown sugar, and melted butter. Whisk together until smooth.
Add the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
In another bowl, combine the cocoa powder, flour, salt, and baking powder. Gradually mix the dry ingredients into the wet mixture until just combined.
If using, fold in the chocolate chips and nuts until evenly distributed.
Pour the batter into the prepared baking pan and spread evenly with a spatula.
Bake in the preheated oven for 20 to 25 minutes, or until a toothpick inserted into the center comes out with a few moist crumbs (not wet batter).
Remove from the oven and let cool in the pan for about 10 minutes before transferring to a wire rack to cool completely.
Once cooled, cut into squares and serve.