Begin by preheating your oven to 325°F (160°C).
Prepare an 8×8-inch or 9×9-inch baking dish by lining it with parchment paper or aluminum foil, ensuring there’s enough excess on the sides to lift the bars out after baking. If using foil, make sure to grease the pan to prevent sticking.
In a medium-sized mixing bowl, sift together the flour, baking powder, and salt, and set it aside. In a stand mixer with the paddle attachment, combine the butter and peanut butter at medium speed until the mixture is smooth.
Gradually add both sugars and continue beating until the mixture is light and fluffy, approximately 2 minutes.
Remember to scrape down the bowl’s sides and bottom as needed. Incorporate the egg and vanilla, mixing until fully combined. Then, add the flour mixture, beating on low speed just until everything is incorporated—be careful not to overmix. Gently fold in the chopped peanuts, reserving a few for topping if desired.
Transfer the dough into the prepared baking dish and smooth out the surface.
Top with the reserved peanuts. Bake for 20-25 minutes, or until the top is a golden brown and a toothpick inserted into the center comes out clean. (For a moist and fudgy texture, consider slightly underbaking them.) Allow the bars to cool completely before lifting them out of the pan and cutting into squares.
Store the bars in an airtight container at room temperature or in the fridge for up to 3-4 days.
They are best served at room temperature. For longer storage, these bars can be frozen for up to 2 months.