Preheat your oven to 350°F (175°C). Grease or line a baking pan with parchment paper.
In a large bowl, whisk together flour, cocoa powder, sugar, and salt until well combined.
Melt the butter and let it cool slightly, then mix in the eggs and vanilla extract until smooth.
Combine the wet ingredients with the dry ingredients until just mixed; do not overmix.
Gently fold in the grated carrots.
Pour the batter into the prepared baking pan and spread evenly.
Bake for 25-30 minutes or until a toothpick inserted comes out mostly clean. Let cool before serving.