Pattern Lock vs PIN vs Face ID: Which Lock Protects a Phone and a Vault Best
What each lock gives away to a watcher, the numbers behind PINs and patterns, how Face ID falls back to the passcode, and which lock to use.
Quick answer
Against someone watching you unlock, a long PIN beats a pattern, and Face ID shows nothing at all. But Face ID always falls back to the passcode, so a person who knows that passcode gets past all three.
- Pattern lock
- Easy to remember and easy to copy. In a 2017 study, observers repeated a six-dot pattern after one look in 64.2% of attempts.
- PIN
- Leaks least to a watcher. The same study found 10.8% for a six-digit PIN after one look, the lowest of the codes it tested.
- Face ID
- Nothing to watch, and Apple puts the chance of a random face unlocking it below 1 in 1,000,000. The passcode stays the backup.
- When to use a vault
- When someone else knows your iPhone passcode. A vault with its own PIN is a second lock that the phone's passcode does not open.
Best overall: Stash
The iPhone offers a passcode and Face ID or Touch ID, and Face ID always falls back to that passcode, so anyone who knows it reaches every photo in the library. Stash adds a second, separate lock: a PIN you choose, typed into a working calculator and followed by =, with optional Face ID or Touch ID. Wrong PINs lead to growing lockouts, and a recovery key covers a forgotten PIN. Stash is free to download with no ads; Premium adds a guest PIN that opens a separate vault.
The short answer, and the question that changes it
Ranked by how well each lock holds up when someone sees you unlock:
- Face ID or Touch ID: there is nothing to watch.
- A long PIN or alphanumeric passcode: hard to read from a glance, harder the longer it is.
- A pattern: the easiest to remember for someone looking over your shoulder.
That ranking answers one threat: a stranger or acquaintance who watches you unlock once. The other common threat is a person who already knows your passcode, such as a family member who set up the phone or someone you once told it to. Against that person, all three phone locks fall together, because Face ID and Touch ID are shortcuts to the same passcode. That is why the choice of a second lock, for the things that matter most, often counts for more than the choice between pattern, PIN and Face ID.
What each lock gives away to someone watching
The best data on this comes from two university studies that test real attacks on phone locks.
Shoulder surfing. In "Towards Baselines for Shoulder Surfing on Mobile Authentication" (Aviv, Davin, Wolf and Kuber, 2017, arXiv:1709.04959), participants watched someone unlock a phone and then tried to repeat the code. For a six-digit PIN they succeeded in 10.8% of attempts after one observation and 26.5% after several. For a six-dot Android pattern the figures were 64.2% and 79.9%. With the pattern's on-screen lines turned off, they dropped to 35.3% and 52.1%.
Smudges. In "Smudge Attacks on Smartphone Touch Screens" (Aviv, Gibson, Mossop, Blaze and Smith, University of Pennsylvania, USENIX WOOT 2010), the researchers photographed the grease a pattern leaves on the screen. In one experiment the pattern was "partially identifiable in 92% and fully in 68%" of the tested lighting and camera setups. Even in the worst conditions they could still partly recover it in 37% and fully in 14%. A pattern is one continuous stroke, so the smudge trail shows its shape; a PIN leaves taps on separate keys, which shows less about the order.
Face ID. There is nothing to observe, and no smudge to read. Apple's limits are about faces instead. Apple says the chance that a random person could unlock your iPhone with Face ID is "less than 1 in 1,000,000 with a single enrolled appearance," that the odds are higher for twins, siblings who look like you and children under 13, and that Face ID is attention-aware (About Face ID advanced technology, published 18 September 2026, checked as of 2 December 2026).
The numbers behind PINs and patterns
The number of possible codes shows how hard a lock is to guess without watching.
- Four-digit PIN: 10,000 combinations.
- Six-digit PIN: 1,000,000 combinations.
- 3×3 pattern of four to nine dots: counting every valid pattern under the usual rules (no dot twice, no jumping over an unused dot) gives 389,112. Most of those are long patterns that few people choose; four-dot patterns number only 1,624.
- Alphanumeric passcode: grows fast with length. Apple says it "would take more than five and one-half years to try all combinations of a six-character alphanumeric passcode with lowercase letters and numbers" on the device, because each attempt is tuned to take about 80 milliseconds (Passcodes and passwords, Apple Platform Security, checked as of 2 December 2026).
Real codes are less random than the totals suggest: people start patterns in a corner and pick birthdays as PINs. Two things make guessing slow anyway. Apple's Platform Security guide says there are "escalating time delays after the entry of an invalid passcode, password, or PIN," and the passcode is "entangled with the device's UID," so attempts have to run on the phone itself.
Pattern lock on iPhone
There is no pattern lock option on iPhone. Apple's Platform Security guide says iOS supports "six-digit, four-digit, and arbitrary-length alphanumeric passcodes." Pattern locks come from Android. Some App Store apps draw a pattern grid for their own lock screen, which protects only that app.
How to set a stronger passcode on iPhone
These steps match the iPhone User Guide page Set a passcode on iPhone in its current edition, checked as of 2 December 2026.
- Open Settings.
- Tap Face ID & Passcode (on an iPhone with Touch ID, Touch ID & Passcode) and enter your passcode if asked.
- Tap Change Passcode (or Turn Passcode On if there is none yet).
- Tap Passcode Options and choose Custom Alphanumeric Code or Custom Numeric Code. Apple calls these the most secure options.
- Enter the new passcode twice.
- Optional: at the bottom of the same screen, turn on Erase Data. Apple says iPhone then erases "all information, media, and personal settings after 10 consecutive failed passcode attempts."
When the iPhone asks for the passcode instead of Face ID
Face ID never fully replaces the passcode. The iPhone User Guide lists the moments when the passcode is always required, including:
- After you turn on or restart the iPhone.
- When it has not been unlocked for more than 48 hours.
- When it has not been unlocked with the passcode in the last 6.5 days and not with Face ID or Touch ID in the last 4 hours.
- After a remote lock command.
- After five failed Face ID or Touch ID attempts.
- After Emergency SOS or Medical ID is used.
So the strength of your phone lock is the strength of the passcode behind Face ID.
Which lock stops which person
This table compares the locks against the people who might try them, based on the studies and Apple pages linked above.
| Who is trying | Pattern | Six-digit PIN | Face ID | Separate vault PIN |
|---|---|---|---|---|
| Someone who watched you unlock once | Often succeeds (64.2% in the 2017 study) | Rarely succeeds (10.8%) | Nothing to watch | Not seen if you unlock the vault in private |
| Someone who reads screen smudges | Often recovers the shape | Sees which keys, less about the order | No smudge to read | Separate code, separate keys |
| A stranger guessing on the device | Slowed by escalating delays | Slowed by escalating delays | Falls back to the passcode after five failures | Slowed by the vault's own lockout |
| A person who knows your phone passcode | Gets in | Gets in | Gets in, via the passcode | Still needs the vault PIN |
| A sibling or twin who looks like you | Not applicable | Not applicable | Higher odds, per Apple | Still needs the vault PIN |
The last two rows are why a phone lock alone is not the whole answer for private photos.
When the iPhone's own lock is enough
For many people it is:
- Nobody else knows your passcode, and you use a six-digit or longer one.
- Face ID is set up only with your face.
- You keep private photos in the Hidden album, which opens with the same Face ID, Touch ID or passcode as the phone.
Then a strong passcode plus Face ID gives you the best of both: nothing to watch day to day, and a long code behind it.
When you need more than the iPhone's own lock
The phone lock is one door to everything. Add a second, separate lock when:
- Someone else knows your passcode. Every app and album that relies on it opens for them.
- You unlock the phone in front of others. On a bus or at work, a passcode can be seen; a vault PIN typed only in private stays yours.
- You hand over the unlocked phone. Showing a photo or lending the phone for a call leaves the library open.
- You want a record of attempts. A vault can log wrong codes with the time they were entered.
How to add a second lock with Stash
Stash looks and works like a calculator. Its lock is a PIN that is separate from your iPhone passcode.
- Install Stash on an iPhone or iPad with iOS 15 or later.
- Create a PIN of at least four digits, digits only, and make it different from your iPhone passcode. A longer PIN follows the same logic as the studies above: more digits, fewer lucky guesses.
- Save the recovery key that Stash shows once during setup. It is the only way to set a new PIN if you forget yours.
- To unlock, type the PIN on the calculator and press =. A wrong PIN simply shows a calculation result.
- Optional: turn on Face ID or Touch ID for the vault, and auto-lock.
- Know the lockout: after 5 wrong PINs Stash locks for 30 seconds, after 10 for 5 minutes, after 15 for 30 minutes.
- With Premium: set a guest PIN that opens a separate vault holding only what you put there, and opt-in intruder photos that take a front-camera picture after a wrong PIN.
FAQ
Is a pattern lock less secure than a PIN?
Against someone watching, yes. In the 2017 shoulder-surfing study, a six-dot pattern was repeated after one look in 64.2% of attempts and a six-digit PIN in 10.8%.
Can someone work out my pattern from smudges on the screen?
Often. In the 2010 smudge study, a pattern was partly identifiable in 92% and fully in 68% of setups in one experiment. Wiping the screen helps but does not reliably remove the trail.
Is Face ID safer than a passcode on iPhone?
It removes the risk of being watched, and Apple puts the chance of a random face unlocking it below 1 in 1,000,000. But the passcode is always the fallback, so use both, with a long passcode.
Can I use a pattern lock on iPhone?
Not for the iPhone itself. iOS offers four-digit, six-digit and custom numeric or alphanumeric passcodes. Some apps use a pattern for their own lock screen.
Should a vault use the same code as my phone?
No. A vault code that matches the phone's passcode opens for anyone who knows that passcode. A different code is what makes it a second lock.
What is the most secure passcode on iPhone?
Apple names Custom Alphanumeric Code and Custom Numeric Code as the most secure options in Passcode Options. Longer is stronger.
What happens if I forget a vault PIN?
That depends on the vault. With Stash, the recovery key shown once at setup lets you set a new PIN. Keep it somewhere away from the phone.
The Bottom Line
Patterns are the easiest of the three locks to copy, which is the claim in the title: in the 2017 study, watchers repeated a six-dot pattern after one look far more often than a six-digit PIN, and smudge trails give patterns away too. Face ID shows nothing to a watcher and Apple rates a random match below 1 in 1,000,000, but it always falls back to the passcode. So the order for a phone is Face ID backed by a long passcode, then a long PIN, then a pattern.
The table above adds the row that the phone lock cannot cover: a person who already knows your passcode gets past every one of those locks. For private photos, the answer is a second lock with its own PIN, typed in private, with a lockout on wrong guesses and a recovery key kept off the phone.
·Written by the developer of Stash
Save this guide
Download this guide as an image