Can You Recover Data From a Passcode-Locked iPhone?
In this article
In most cases, no: if an iPhone is locked with a passcode you do not know, there is no official way to recover the data from it. Apple designed iOS storage to be encrypted with keys tied to your passcode, so without that passcode the data is effectively inaccessible. The only official options are to restore the device (which erases it) or, if you have a backup, to recover data from that backup instead.
Why a Passcode Lock Blocks Data Recovery
Since iOS 8, Apple has encrypted the contents of an iPhone by default. The encryption key is wrapped with your passcode, and the secure enclave chip enforces delays and limits on repeated wrong guesses. This is not a simple lock screen you can bypass with software; it is full-disk encryption where the passcode is part of the key. Without the correct passcode, the data remains scrambled. Even forensic tools that claim to extract data from locked iPhones generally work only on older iOS versions or specific configurations, and they are not available to ordinary consumers.
Apple itself cannot unlock your iPhone or recover data from it. The company has stated that it does not have the passcode and cannot bypass it. If you contact Apple Support, they will tell you to restore the device or use a backup.
What You Can Actually Do
If you are locked out of an iPhone and need the data, the realistic paths depend on whether you have a backup and whether the device is running a recent version of iOS.
- Restore from an iCloud or computer backup: If you previously backed up the iPhone to iCloud or to a computer, you can set up the device again and restore from that backup. The backup contains the data as of the last backup date, not anything created after it.
- Use iCloud.com for synced data: Photos, contacts, calendars, notes, and some other data may be available on iCloud.com if you had iCloud syncing enabled. You can log in with your Apple ID and password (and two-factor authentication) to access that data from a browser.
- Erase the iPhone and start over: If you have no backup, the only way to use the iPhone again is to erase it. You can do this with Find My iPhone (if enabled) or by putting the device in recovery mode and restoring it with a computer. This deletes all data on the device.
Note that restoring from a backup still requires the passcode of the iPhone? No, restoring from a backup does not require the old passcode, but you will need the Apple ID and password associated with the backup, and you may need to verify two-factor authentication. The backup itself is encrypted with the Apple ID password (or a device backup password if you set one on a computer).
Steps to Erase a Locked iPhone and Restore From Backup
If you have a backup and want to recover data, you will need to erase the iPhone first. The steps below are for a device running a recent version of iOS; labels can differ slightly by version, device, or region.
- If you have Find My iPhone enabled, you can erase the device remotely: go to iCloud.com/find on another device, sign in with your Apple ID, select the iPhone, and choose Erase. This will also remove the passcode.
- If you cannot use Find My, connect the iPhone to a computer and put it in recovery mode. The button combination for recovery mode varies by iPhone model: on iPhone 8 and later, press and quickly release the volume up button, then the volume down button, then press and hold the side button until the recovery mode screen appears. On iPhone 7, press and hold the volume down button and the side button. On iPhone 6s and earlier, press and hold the home button and the side button. You can find Apple's official instructions for your model if unsure.
- Open Finder (on macOS Catalina or later) or iTunes (on Windows or older macOS) and select your iPhone when it appears. Choose the option to restore the iPhone. This will download and install the latest iOS software and erase the device.
- After the restore, the iPhone will restart to the setup screen. Follow the prompts and choose to restore from an iCloud backup or from a backup on your computer.
Be aware that erasing the device deletes all data that was not backed up. If you have no backup, that data is gone permanently.
What About Third-Party Recovery Tools?
Many websites and software vendors advertise tools that can "unlock" a locked iPhone or recover data from it. Be very cautious. Most of these tools do not actually decrypt data; they either perform a restore (erasing the device) or exploit security flaws that are typically patched in current iOS versions. Some may be scams or contain malware. Apple's security measures are robust, and there is no consumer-grade tool that can extract data from a passcode-locked iPhone running a modern version of iOS without the passcode. If a service claims otherwise, treat it with skepticism.
There are legitimate data recovery tools for computers and for damaged devices, but for a passcode-locked iPhone, they generally cannot help. The only exception is if the device is jailbroken or running an old iOS version with known vulnerabilities, but those are not typical situations.
Preventing Future Lockouts
The best way to avoid this situation is to have regular backups and a way to remember your passcode. Consider these practices:
- Enable iCloud Backup so your data is automatically backed up daily when the device is connected to power and Wi-Fi.
- Periodically back up to a computer as well, especially before major iOS updates.
- Use a passcode you can remember, or store it securely in a password manager. Avoid using simple codes like 0000 or 1234, but also avoid something so complex you forget it.
- Enable Face ID or Touch ID for convenience, but remember the passcode is still required after a restart or if biometrics fail.
- Keep your Apple ID credentials safe, as they are needed to restore from iCloud backups.
Frequently Asked Questions
Can Apple unlock my iPhone if I prove I own it?
No. Apple does not have the passcode and cannot bypass it. They can help you erase the device, but not recover data from it without the passcode.
Can I recover data from a locked iPhone without a backup?
Generally no. Without a backup, the data on a passcode-locked iPhone is inaccessible. The only way to use the device again is to erase it, which deletes the data.
Does restoring from a backup require the old passcode?
No, you do not need the old passcode to restore from a backup. You will need the Apple ID and password associated with the backup, and possibly two-factor authentication.
What if I forgot my iPhone passcode but have a backup?
You can erase the iPhone and then restore from your backup. The backup will contain the data as of the last backup date.
Are there any legitimate services that can unlock a locked iPhone?
Some services claim to unlock iPhones, but they typically only work on older iOS versions or specific models, and they often erase the device. For modern iPhones, there is no legitimate consumer service that can recover data without the passcode.
Can I use Siri to bypass the lock screen and access data?
Siri is designed to limit what can be done from the lock screen. While there have been occasional bugs, Apple quickly patches them. You should not rely on Siri to access data from a locked iPhone.
If That Did Not Work
If you have tried erasing and restoring and still cannot get your data back, it is likely gone. Consider checking iCloud.com for any synced data, and check if you have any older backups on other devices or computers. If the data is critical, you might contact a professional data recovery service, but be aware that they will likely not be able to help with a passcode-locked iPhone either. Prevention is the best strategy: back up regularly and keep your passcode safe.