Preheat the oven to 350 degrees F. Line a 9-by-13-inch baking pan with parchment paper and spray with cooking spray.
Cream the sugar and butter in a large bowl with an electric hand mixer until fluffy. Mix the vanilla and eggs in a separate bowl. Add this to the sugar mixture and beat until pale, about a minute. Add the flour, cocoa, baking powder, baking soda and salt and mix until fully combined.
Pour the batter into the prepared pan and bake until a toothpick inserted in the center comes out clean, 35 to 45 minutes. Let cool completely before slicing.