Preheat the air fryer: Set the air fryer to 400°F. If your model runs hot, use 375°F or 390°F instead.
Prep the corn: Shuck the corn, remove the silk, rinse if needed, then pat dry. Trim the ends or cut the cobs in half if they’re too long.
Season the corn: Rub each ear with olive oil or melted butter, then sprinkle with salt and pepper. Use only a thin coating.
Arrange in the basket: Place the corn in a single layer in the air fryer basket. Cook in batches if needed so the air can circulate.
Air fry until tender: Cook for 8–10 minutes, rotating halfway through. The corn is done when the kernels are bright yellow, tender, and lightly browned.
Finish and serve: Serve hot with butter, lime, herbs, cheese, chili powder, or your favorite seasoning.