How to Disable the iPhone Setting That Erases Data After 10 Failed Attempts

To stop your iPhone from erasing itself after 10 failed passcode attempts, open Settings > Face ID & Passcode (or Touch ID & Passcode on iPhones with a Home button), enter your passcode, scroll to the bottom, and turn off Erase Data. Your iPhone will still lock you out for longer periods after repeated wrong guesses, but it won’t automatically delete everything on the tenth failed attempt.

This guide covers the steps, what happens after failed attempts with the setting on or off, the security trade-off, why the switch might be grayed out, and what to do if you’re already locked out.

What the Erase Data setting does

When Erase Data is on, your iPhone permanently erases all data and settings after 10 consecutive wrong passcode entries. It’s designed to protect your information if your phone is stolen. The downside is that a child, a curious friend, or a phone bouncing in a pocket could trigger it, and anything not backed up would be lost.

How to turn off Erase Data

  1. Open Settings.
  2. Tap Face ID & Passcode. On iPhone SE, iPhone 8, and older models, tap Touch ID & Passcode. On models without either, tap Passcode.
  3. Enter your passcode.
  4. Scroll to the bottom and turn off Erase Data.
iPhone Face ID and Passcode settings with the Erase Data switch after 10 failed passcode attempts highlighted
(1) Open Face ID & Passcode, then (2) turn off Erase Data at the bottom. (Illustration)

To turn it back on later, return to the same screen, turn on Erase Data, and tap Enable to confirm.

What happens after failed attempts

With or without Erase Data, the iPhone makes you wait longer after each run of wrong passcodes. After several failed attempts, it shows iPhone Unavailable with a timer, and the delay grows from one minute up to an hour or more as the failures continue.

  • Erase Data on – on the 10th consecutive wrong passcode, the iPhone erases itself.
  • Erase Data off – after too many attempts, the iPhone stays locked with iPhone Unavailable or Security Lockout. On iOS 15.2 and later, the lock screen can offer an Erase iPhone or Forgot Passcode? option so you can reset it with your Apple Account password.

Should you turn it off?

  • Reasons to turn it off – young children use your phone, you worry about accidental erasure, or you don’t have regular backups.
  • Reasons to leave it on – you carry sensitive data and want extra protection against someone guessing your passcode. Even with it off, a strong alphanumeric passcode and the growing delays make guessing impractical.

Whichever you choose, keep iCloud or computer backups current so an erased phone can be restored.

Erase Data is grayed out or missing

  • Managed devices – a work or school device management profile can force this setting. Check Settings > General > VPN & Device Management, and ask your IT department.
  • Screen Time restrictions – check Settings > Screen Time > Content & Privacy Restrictions > Passcode Changes and make sure it’s set to Allow.
  • No passcode set – the option appears only when a passcode is turned on.
  • Stolen Device Protection – if it’s on and you’re away from familiar locations, iOS may require Face ID or Touch ID, and a delay, before you change some security settings.

If you’re already locked out

  1. If you remember the passcode, wait for the timer to end and try again carefully.
  2. If you’ve forgotten it, tap Forgot Passcode? or Erase iPhone on the lock screen (iOS 15.2 and later) and sign in with your Apple Account password to erase and set up the phone.
  3. Or connect the iPhone to a computer, put it in recovery mode, and restore it with Finder, the Apple Devices app, or iTunes.
  4. After erasing, restore from your latest backup.

There’s no way to recover a forgotten passcode without erasing the iPhone. Be wary of tools that claim otherwise.

For stronger security, use letters in your passcode.

Frequently asked questions

Does turning off Erase Data make my iPhone less secure?

Slightly, but the escalating lockouts, a strong passcode, and Find My still protect your data well for most people.

Does the iPad have the same setting?

Yes. Go to Settings > Face ID & Passcode or Touch ID & Passcode on the iPad and turn off Erase Data.

Do failed Face ID attempts count toward the 10?

No. Only wrong passcode entries count. After a few failed Face ID or Touch ID attempts, the iPhone asks for your passcode.