Skip to content

PIN generator

Random PINs for bank cards, phone passcodes, alarms and locks, without the easy-to-guess ones.

Length

With 3 tries before a lock, a guesser has a 3 in 10,000 chance of hitting one of these PINs.

How it works

What makes a PIN hard to guess

A PIN is short, so it relies on two things: being random, and being protected by a limit on wrong attempts. A random PIN gives a guesser no head start; a lockout after a few tries stops them from trying them all.

LengthPossible PINsChance with 3 random guesses
3 digits1,0001 in 333
4 digits10,0001 in 3,333
5 digits100,0001 in 33,333
6 digits1,000,0001 in 333,333
8 digits100,000,0001 in 33 million

Those odds only hold for random PINs. Real people favor 1234, 1111, 0000, 1212 and years of birth, so a guesser who starts with those does far better. That is why this generator skips them by default.

For a phone, use at least 6 digits. An iPhone asks for a six-digit passcode when you set one up, and only uses four digits if you choose that under Passcode Options.

Most common 4-digit PINs

In 2012, DataGenetics analyzed almost 3.4 million four-digit passwords from leaked password databases, as a stand-in for the PINs people choose. These 20 made up over a quarter of them. The "avoid easy PINs" option never gives you any of them.

RankPINShare of all PINs
1123410.713%
211116.016%
300001.881%
412121.197%
577770.745%
610040.616%
720000.613%
844440.526%
922220.516%
1069690.512%
1199990.451%
1233330.419%
1355550.395%
1466660.391%
1511220.366%
1613130.304%
1788880.303%
1843210.293%
1920010.290%
2010100.285%

Source: PIN analysis by DataGenetics (2012).

For accounts that accept letters too, a random password or a passphrase is much stronger than any PIN.

Frequently asked questions

Is a 4-digit PIN secure?

For a bank card or phone that locks after a few wrong tries, a random 4-digit PIN is fine: with 3 attempts, a guesser has a 3 in 10,000 chance. The danger is predictable PINs. In a 2012 analysis of almost 3.4 million four-digit passwords from data breaches, 1234 alone made up almost 11%. Where you can choose, 6 digits are much safer.

Why avoid birthdays and years?

Years from 1900 to 2099 are only 200 of the 10,000 possible four-digit PINs, and birthdays are often public. Attackers who know a little about you try them first. The "avoid easy PINs" option skips them, along with repeats like 1111, runs like 1234 or 9876 and patterns like 1212.

What is the least common PIN, and should I use it?

In DataGenetics' 2012 data, the least used four-digit PIN was 8068. Don't switch to it, or to any PIN from a "least common" list: attackers read those lists too, so a PIN that was rare becomes one they try early. DataGenetics warned its own readers of exactly that. A PIN picked at random can't be on anyone's list.

How random are these PINs?

Each digit comes from your browser’s cryptographically secure random number generator, so every allowed PIN is equally likely and nobody can predict them.

Are the PINs stored anywhere?

No. They are generated in your browser and disappear when you leave the page. Nothing is sent to a server.