How can I disable a pass code that I didn't intentionally set?

I have an iphone4 and I have never locked the phone or set a passcode, but for some reason, the phone is now requiring a 4 digit passcode and will not let me do anything but unlock it without the passcode. I have tried a couple but each time the phone locks and wont let me try again for several minutes. Is there any way to fix this?


  1. Has anyone else had access to your phone and played a prank on you? You should ask people who may have had access to your phone what passcode they set.

  2. Does iTunes still let you sync? Normally if iTunes has never seen your phone before a passcode is put on it, it requires you to unlock the phone first. But if it had previously seen the phone locked, it may let you sync your phone to do one last backup of your data, because;

  3. If there is no way can regain access to your phone, you must restore it.

There are two ways of doing this:

The easy way is, if iTunes lets you plug in your phone and click 'restore', then do that. Again, please bear in mind that you WILL LOSE ALL UNSYNCED DATA when doing this, see note #2.

Otherwise, you must put your device in 'DFU' mode in order to forcefully recover it. Again, because this is absolutely even more important:

After entering DFU mode there is absolutely no way to get out of it, as soon as you follow these instructions you will be on the road to completely restoring your phone. Again, see the previous bold/italics and Note #2.

Per Apple's Unable to update or restore support article (note also that you can click on the images in order to view them larger in this answer):

While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.

Note: If you see the screen pictured below, let the device charge for at least ten minutes to ensure that the battery has some charge, and then start with step 2 again.

Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears you can release the Home button:

If necessary, open iTunes. You should see the following "recovery mode" alert:

Use iTunes to restore the device.

If you don't see the "Connect to iTunes" screen, try these steps again. If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.

Additional Information
Note: When using recovery mode, you can only restore the device. All user content on the device will be erased, but if you had previously synced with iTunes on this computer, you can restore from a previous backup. See this article for more information.