A step-by-step guide on what to do when you've forgotten your iPad, iPod or iPhone passcode. Fix and restore your iOS device with iTunes.

Fix and restore an iPad, iPhone or iPod when you've forgotten your passcode.

How to reset a forgotten passcode on iPad, iPhone or iPod: Restore your device with iTunes

If you're locked out of your iPad, iPod or iPhone then don't fret because there is a way to reset a forgotten iOS passcode.

Whether or not your device is synced to iTunes, it's possible to fix and restore your iOS passcode on iPod, iPad or iPhone. Even if you've put a wrong passcode in six times and are presented with an "iPad is disabled" messages, not all is lost.

Luckily, Apple has thought about this possibility and made a way for devices to be reset. The key question is have you already synced your iPad or iPhone with iTunes on your computer? We've written a guide for those that have and those of you who haven't.

The key thing to note, though, is that unless you made a backup of your device before you forgot your passcode, you might lose some of your recent data.

This guide will also work for anyone with an iPod touch.

Apple advises the following:

If you've synced your iPhone, iPad or iPod with iTunes, use iTunes to erase your device and remove your passcode.

If you're signed in to iCloud and have enabled Find My iPhone, use iCloud to erase your device.

If you can't sync or connect with iTunes and you don't use iCloud, use recovery mode to erase your device.

We explain how to erase your device and remove your passcode using all three of the above methods here. Read on to find out how.

How to use iTunes to reset a forgotten passcode

If you've recently synced your iPad, iPhone or iPod with iTunes on your computer, you'll be able to restore your device using the software.

First, connect your iPad, iPod or iPhone to the PC or Mac that you normally sync with and open iTunes. If iTunes asks you to enter the passcode, use another computer that you have previously synced with. Otherwise, you'll need to use recovery mode or iCloud (read on to find out how).

If the device is still disabled, or if iTunes does not automatically sync your device, sync the device with iTunes with the 'Sync' button.

When the backup and sync is complete, restore your device by clicking 'Restore iPad' (or iPhone).

When the iOS Setup Assistant asks to set up your device, click "Restore from iTunes backup".

Select your device in iTunes and choose the most recent backup of your device.

How to use iCloud to reset a forgotten passcode

If you happen to have Find My iPhone setup on your device, you'll be able to use iCloud to erase it and restore it, which will in turn erase its passcode. It will also erase the contents of it, though, which means you'll lose photos and anything else you had stored on it unless you have an iTunes or iCloud backup.

In order to do so, go to icloud.com/find from a computer or mobile device. There, you'll need to sign in with your Apple ID (the email address and password you use to login to the iOS App Store).

You should see All Devices at the top of the window. Click that and choose the device you're locked out of. Then choose Erase.

You'll now be able to restore from a backup if you have one, or set up your device as new.

How to use recovery mode to reset a forgotten passcode

If you see one of following alerts, you need to erase your device.

"iTunes could not connect to the [device] because it is locked with a passcode. You must enter your passcode on the [device] before it can be used with iTunes." Or "You haven't chosen to have [device] trust this computer"