You are probably going to have to erase the iPhone and restore a recent backup.

That means you’ll need to erase the contents of the iPhone and start over.

Here’s what to do.

iPhone recovery mode screen

Apple Inc.

How to Unlock an iPhone Without the Password

There’s good news and bad news.

The good news is youcanunlock an iPhone even without its passcode.

The bad news is you have to erase the iPhone and set it up from scratch.

Recovery process for an iPhone on Mac

If not, though, you may lose some data.

Here’s what to do:

If you use Windows,install iTunes on your rig.

If you use a Mac, skip to the next step.

The iCloud.com website

Connect the USB cable that came with the phone to your iPhone, but not to your system.

When the Recovery Mode screen appears on your iPhone, let go of the button.

Apple Inc.

What you do here depends on what kind of computer you’re using:

ClickRestore.

Main iCloud.com options

When the set up is complete, disconnect your iPhone from the computer.

There are lots of third-party apps that claim to be able to unlock an iPhone without the passcode.

Don’t believe it.

The main Find My iPhone menu

Apple’s security is very difficult to defeat.

Don’t waste your money.

This assumes you’ve alreadyset up Find My, of course.

Find My iPhone Erase menu

access using yourApple ID/Apple Accountand password (this is not the passcode for your iPhone.

ClickAll Devicesand then click your iPhone.

In the pop-up, clickErase.

The Erase this iPhone confirmation in iCloud

For online or phone help, go toApple’s support website.

you might alsomake an appointment for in-person help at your closest Apple Store.

SelectErase iPhone, then key in your Apple Account password when prompted.