Preheat the oven to 350°F. Butter a 9-inch springform pan or an 8-inch square baking pan. If using a square pan, line with parchment paper.
In a standing mixer fitted with a paddle attachment or with a handheld mixer, beat together the butter and sugar until pale. Add the vanilla extract and eggs on medium speed until well combined. With the mixer on low, add the flour, baking powder and salt and mix until evenly combined. (The batter will be on the dense side.) Fold in the walnuts, if using.
Spread the batter into your prepared pan and drop small spoonfuls of the nutella on top. Pull the tip of a knife through the nutella to create a marbled effect on the surface. Bake in the oven for 25-30 minutes or until a toothpick inserted into the center comes out clean.
Transfer to a wire rack to cool completely. Cut into bars or wedges and enjoy!