Lightly grease an 8-inch square baking dish with butter and line with parchment paper or aluminum foil.
In a medium saucepan, combine the peanut butter and unsalted butter, then place over medium heat and bring to a boil, stirring occasionally.
Once boiling, remove from heat and stir in the powdered sugar and vanilla until smooth and no lumps of sugar remain. (If desired, also add ¼ teaspoon of salt.)
Pour the fudge into the prepared baking dish and spread it out with a spatula. Let cool at room temperature for several hours or refrigerate until set, about 1 hour.
Once cooled, remove the fudge from the pan using the parchment paper to lift it out, then cut it into 1-inch squares. The fudge can be stored in an airtight container at room temperature for up to a week or in the fridge for up to 1 month.
