Preheat your air fryer to 350°F (175°C) for about 3-5 minutes.
Place the raw peanuts in the air fryer basket in a single layer. Roast at 350°F for 10-12 minutes, shaking the basket halfway through to ensure even roasting. Keep an eye on them to prevent burning; they should be golden brown and fragrant.
After roasting, remove the peanuts from the air fryer and let them cool for a few minutes.
Once cooled, transfer the roasted peanuts to a food processor. Blend for about 3-5 minutes, stopping occasionally to scrape down the sides. The peanuts will first turn into a powder, then clump together, and finally become a creamy paste. If you prefer a creamier consistency, add 1-2 tablespoons of peanut oil while blending.
Once the desired consistency is reached, add salt and sweetener (if using) to taste, then blend again to combine.
Transfer the roasted peanut butter to an airtight container. It can be stored in the refrigerator for up to 2-3 weeks.