Prep the garlic: If using whole heads, slice about 1/4 inch off the top to expose the cloves.
If using loose cloves, leave them in their skins or use pre-peeled to save time.
Season: Place the garlic (cut-side up if using whole heads) on a piece of foil or in a small ramekin. Drizzle with olive oil, and sprinkle with salt and pepper. Add herbs if you like.
Wrap or cover: Loosely wrap the garlic in foil.
If using a ramekin, cover it with foil. This traps steam so the cloves turn soft and creamy.
Air fry: Place in the air fryer basket. Cook at 370°F (190°C) for 14–18 minutes for whole heads, or 10–12 minutes for loose cloves.
Check at the lower end of the range—air fryers vary.
Test for doneness: The cloves should be deep golden at the tips and very soft when pressed. If they’re still firm, cook 2–4 minutes more.
Cool and squeeze: Let the garlic cool for a few minutes. For whole heads, squeeze from the base to push out the softened cloves.
For loose cloves, peel off the skins and mash.
Use or store: Mash with a fork and spread on toast, whisk into vinaigrettes, or fold into butter, hummus, or mashed potatoes. Store leftovers properly (see below).