Ask a security person which lock is safest and the first answer is a question back: safe from whom? A pattern that holds up fine against a pickpocket is useless against the colleague who sat beside you on the train, and a face that no stranger can fake is available to anyone who can wake you up. The ranking depends on the adversary, so start there.
Which kind of attacker are you worried about?
- A stranger who finds the phone and guesses.
- Someone near you who watches you unlock it.
- A person who knows you and can hold the phone up to your face.
- A tool that tries combinations automatically.
How many combinations does each lock really have?
| Lock | Possible combinations | Note |
|---|---|---|
| 4-digit PIN | 10,000 | Digits 0-9, four places |
| 6-digit PIN | 1,000,000 | Common default on iPhone |
| 3x3 pattern, 4 to 9 dots | 389,112 | Counted by enumerating every legal path; only 1,624 use exactly 4 dots |
| Face ID, random person | Less than a 1 in 1,000,000 chance of a false match, per Apple | Higher for twins, siblings and children under 13 |
A 4-dot pattern offers fewer options than a 4-digit PIN, and people choose patterns that start in a corner and draw simple shapes, which shrinks the space further. A larger grid raises the count a great deal, but few phones offer one. What a pattern really has going for it is speed.
The short ranking, and the question that reorders it
| Adversary | Best of the three | Worst of the three |
|---|---|---|
| A stranger guessing codes | Long passcode or PIN | Pattern on a small board |
| Someone watching you unlock | Face ID | Pattern |
| Someone who can use your face | Passcode or PIN | Face ID |
| Automated guessing against the file store | Whatever is slowed by the phone, then a long secret | Short codes on an app with no attempt limit |
The reorder happens because each lock leaks a different thing. A pattern is easy to read by eye, a PIN takes a watcher a little longer, and Face ID is open to anyone who can point the phone at your face. Asking which is safest really means choosing which exposure you can live with.
What each lock gives away to someone watching
- Pattern. One glance shows the whole shape, and oily smudges on the glass can show the path later. Researchers have demonstrated recovering patterns from smudges on touch screens, so wipe the screen or choose a pattern that crosses itself.
- PIN. Four or six taps are quick to see, but a watcher has to catch the order of the digits, which is harder than catching a shape. Cover the keypad in public.
- Face ID. Nothing is typed, so there's nothing to watch. The risk shifts to someone who can use your face.
Is Face ID or a passcode the safer lock on iPhone?
Apple says a random person has less than a one in a million chance of unlocking an iPhone with Face ID when a single appearance is enrolled, and that the probability is higher for twins, siblings and children under 13. Face ID allows five unsuccessful match attempts before the passcode is required, and the passcode is also needed once the phone restarts, once 48 hours pass with no unlock, or when a remote lock command arrives. In each of those moments the passcode is your real lock, so its quality is what you're actually trusting.
Face ID doesn't resist coercion, or a sleeping person in the same room. Someone who can hold the phone toward your face may succeed, depending on settings such as attention awareness, which Apple lets you turn on or off. If that scenario is realistic for you, a strong passcode and knowing how to force a passcode prompt (see the practical advice below) matter more than the biometric.
The arithmetic underneath, and why board size changes it
A guess count is the number of distinct secrets an attacker has to cover. A 6-digit PIN has 1,000,000. A pattern on the familiar 3x3 board has 389,112 legal paths of 4 to 9 dots, and most people pick short, simple ones from a corner, so the number that matters is far smaller. Enlarging the board changes the picture quickly. On a 4x4 board, counting paths of only 4 to 6 dots under the same rules, we get 1,503,504, which already exceeds a 6-digit PIN, and on a 5x5 board, paths of exactly six dots number about 19.2 million, with longer paths multiplying that. These counts come from enumerating every legal path with the usual rule that a line can't jump over an unvisited dot, so rules such as a required change of direction would trim the total.
| Board | Path length counted | Legal paths |
|---|---|---|
| 3x3 | 4 to 9 dots | 389,112 |
| 4x4 | 4 to 6 dots | 1,503,504 |
| 5x5 | exactly 6 dots | about 19.2 million |
| 6-digit PIN | 6 digits | 1,000,000 |
Two cautions apply. The first is that a big space doesn't help if people choose from a handful of memorable shapes, which is why research on pattern choice finds so much clustering. The second is that the number of combinations only matters when guessing is the attack. When the attack is a shoulder surf, a pattern with 19 million possibilities falls to a single glance exactly as a 3x3 pattern does.
What the app does with the pattern matters more than the count. If the pattern is only compared to a stored value, an attacker who can reach the stored files never has to guess it. If it's used as part of the key that protects the files, the attacker has to guess the pattern, and then the size of the board limits how fast a patient attacker succeeds. On a phone, Apple additionally slows repeated wrong passcodes and offers an optional erase after ten failed attempts, which protects the phone passcode in a way no third-party app can duplicate without help from the operating system.
Which lock belongs on which door?
| Door | Better choice | Why |
|---|---|---|
| The phone itself | Face ID with a long numeric or alphanumeric passcode | Fast for you, strong against guessing |
| An app inside the phone | Face ID, or the phone passcode | Consistent and quick |
| A separate vault that must differ from the phone code | A PIN or passphrase that differs from your passcode | A pattern that someone has seen is just as defeated |
| A device shared with family | A strong passcode that nobody else knows | Biometrics can be enrolled by others |
Is a pattern lock in a vault app good enough?
Some vault apps offer a pattern. It's quick and doesn't clash with the phone passcode, which is its appeal. Its weaknesses are the ones above: fewer combinations, easy to observe, smudge-prone. The fair approach is to treat it as a convenience lock and to ask what the app does with it. If the pattern only gates the interface, a determined attacker isn't stopped by it. If it feeds the key that protects the files, the pattern's small space becomes a real limit. See what pattern encryption would mean and hidden vaults for the related questions.
What this means for choosing a vault lock
Pick the lock by the room it guards. For the phone, use Face ID plus a long passcode, because the passcode is what Face ID falls back to. For a vault that must differ from the phone, choose a secret nobody has watched you enter, and enter it where nobody can see. Whether that secret is a pattern, a PIN or a passphrase matters less than whether it's different and whether it contributes to the key.
Practical settings worth changing today
- Use a six-digit PIN at least, or an alphanumeric passcode if you can type it quickly.
- Avoid dates and repeated digits.
- Use a different code for any vault than for the phone, so one leak doesn't open both.
- If someone may pressure you to unlock, know that holding a volume button and the side button for two seconds starts power off or Emergency SOS, after which Apple says the passcode is required.
- Keep the screen clean, and draw your pattern with a firm, deliberate path instead of a light brush that leaves a clear trail.
The point of the second item is operational. A date is the first thing anyone who knows you will try, and a person who has watched you type a code once usually remembers it a good deal longer than you'd like. If someone in your life has seen your code, what to do when a partner knows your iPhone passcode is the more useful read.
If you forget the vault pattern
Before you choose any pattern, ask what happens when you forget it. Some apps can't recover it at all, and the files are lost. Others offer a reset that wipes the protected data, and still others keep a recovery phrase you wrote down at setup. That third kind is the most forgiving, and it only works if the phrase is stored somewhere other than the phone. Test it once in the first week, by restoring on a spare device if you can.
Questions people ask
Can someone work out my pattern from smudges on the screen?
Researchers have shown it can be done under good conditions, especially for simple shapes. Wiping the screen regularly and choosing a longer pattern that crosses itself reduces the risk, and a PIN avoids the problem.
Which is safer on iPhone, Face ID or a passcode?
Against guessing and watching, Face ID is strong. It doesn't protect against someone who can use your face, and the passcode is still required after a restart and in several other situations.
Would a different vault pattern help if someone knows my passcode?
Yes, if the vault pattern really differs from the passcode, because it's a second thing to learn. But a pattern is the weakest of the options and the easiest to see being drawn.
What happens if I forget my vault's pattern?
It depends on the app. Some can't recover it at all, and others offer a reset that may remove the protected data. Find out which before you store anything you can't replace.
Which lock is best for a photo vault, a pattern, PIN or Face ID?
For a vault that must differ from your phone, a long PIN or passphrase beats a short pattern on guessing, while a pattern beats both on speed. Choose a lock that differs from your phone's code, and check whether the app uses it as part of the key.
Does a bigger pattern grid make a lock safer?
Against guessing, yes, because the number of legal paths grows fast with board size. Against a watcher it changes little, since one glance records a long path as easily as a short one.
Sources