Score each hot dog with 3 to 4 shallow diagonal slits on each side. This helps them cook evenly and gives them a great charred look.
Preheat the air fryer to 400°F (200°C) for 2 minutes.
Place the hot dogs in the air fryer basket in a single layer. Cook at 400°F for 5 to 6 minutes, turning once halfway through, until they are plump, slightly charred, and heated through.
Brush the insides of the hot dog buns with melted butter and place them in the air fryer. Cook at 400°F for 1 to 2 minutes until lightly toasted and golden.
Place each hot dog in a toasted bun and top with ketchup, mustard, relish, and diced onion. Serve immediately.