Use Recovery Mode with a computer
Connect the iPhone to a Mac or Windows PC
Open Finder on macOS Catalina or later
Open iTunes or the Apple Devices app on Windows or older macOS
Put the iPhone into Recovery Mode
On iPhone 8 or later, press and release Volume Up, press and release Volume Down, then hold the Side button until the recovery screen appears
On iPhone 7 or 7 Plus, hold the Side button and Volume Down button until the recovery screen appears
On iPhone 6s or earlier, hold the Home button and the Side or Top button until the recovery screen appears
When prompted, choose Restore
Wait for the computer to erase and reinstall iOS
Use iCloud Find My to erase remotely
Go to iCloud.com/find on a browser
Sign in with the Apple ID linked to the iPhone
Select the iPhone from the device list
Choose Erase iPhone
Confirm the erase request
Use the Find My app on another Apple device
Open Find My
Select the iPhone
Tap Erase This Device
Confirm the erase request
If Activation Lock appears after reset, enter the Apple ID and password previously used on the iPhone
If the Apple ID password is forgotten, recover it at iforgot.apple.com
