Preheat your air fryer to 265 degrees Fahrenheit (I used this basket air fryer). I usually preheat mine for about 3-4 minutes.
Now place 8 eggs right on the bottom of the air fryer.
Cook the eggs for about 15-16 minutes for hard-boiled eggs. For soft-boiled eggs, cook for about 14 minutes. Note: every air fryer is different so you might need to play around with the cook times of the eggs.
Once the eggs are cooked, quickly place them in a bowl with ice and cold water.
Once the eggs are cooled down enough to touch, go ahead and peel them. Don’t leave them in the ice water for too long or else they will be difficult to peel.
Notes
Adjust cook times- Since every air fryer is different, you might need to play around with the cook times to get your eggs as hard-boiled or soft-boiled as you like.
Don't overcrowd- I used only 8 eggs because I wanted to leave space in between for heat circulation. Don't overcrowd the air fryer basket or it will affect the eggs' even cooking.
Prepare your ice bath in advance- Set up the bowl of water and ice so when the eggs are done, they can go directly into the water to cool off. This keeps them from overcooking.
Clean your air fryer- If you notice brown spots on your hard-boiled eggs, it's likely because the air fryer had some residue from previous use. It's no big deal though and doesn't affect the eggs. Peel as normal.