Random PIN generator

Make a random 4 digit PIN, a 6 digit PIN or anything up to 12 digits. Easy PINs like 1234, 1111 and 1990 are skipped, and you can ask for no repeated digits. Every digit is picked on your device, and the PIN is not sent anywhere or saved.

4 digits
How many

Made in your browser. The PIN is created on this page and is not sent anywhere, saved or logged. Close the page and it is gone.

Why people pick easy PINs

A PIN people choose for themselves is rarely random. In an analysis of almost 3.4 million four-digit passwords from leaked password lists, a stand-in for real PINs, 1234 alone made up nearly 11 percent. 1111 came second with over 6 percent and 0000 third with almost 2 percent. The 20 most common codes covered 26.83 percent of everything.1

The same study found the patterns behind those choices: repeated pairs like 1212, doubled digits like 1122, years of birth starting with 19, and 2580, the line straight down the middle of a phone keypad.1 Someone guessing a PIN tries these first. A random PIN takes that shortcut away.

How this PIN generator works

Each digit comes from your browser’s cryptographic random number generator, the same one used to make encryption keys. Random numbers that would make some digits slightly more likely than others are thrown away and drawn again, so every digit from 0 to 9 has exactly the same chance.

With “skip easy PINs” on, the generator throws away any PIN that is:

  • one digit over and over, like 0000 or 777777
  • a short block said again, like 1212, 6969 or 123123
  • doubled digits, like 1122 or 112233
  • a straight run up or down, like 1234, 4321 or 7890
  • a year from 1900 to 2099, for 4 digit PINs
  • a well-known pick such as 2580, 2468 or 1004

It then draws a whole new PIN, so every PIN that is left stays equally likely. For 4 digits that leaves 9,577 of the 10,000 possible PINs, almost all of the room, without the ones a guesser tries first.

Everything happens on this page. The code that makes the PIN is part of the page, and it does not send the PIN anywhere or store it. You can disconnect from the internet after the page loads and it still works.

4 digit or 6 digit PIN

Every digit you add multiplies the possible PINs by ten. That matters most when the device limits how many wrong tries it allows, as a phone or a bank card does.

LengthPossible PINsChance that 10 guesses find a random PIN
4 digits10,0001 in 1,000
6 digits1,000,0001 in 100,000
8 digits100,000,0001 in 10 million
All digit combinations, before easy PINs are skipped. Skipping them changes the counts by well under 5 percent.

NIST’s digital identity guidelines say a PIN that unlocks a device or security key must be at least 4 digits, should be at least 6, and should be checked against a list of common choices such as 123456. The device must stop after no more than 10 wrong tries in a row.2 Where you can choose, use 6 digits or more.

A PIN is only strong because of that limit on tries. Without it, any PIN of 12 digits or fewer can be found quickly by trying them all. Where nothing limits the guesses, use a long random password instead.

PINs with no repeated digits

Some systems refuse PINs that use a digit twice, and some people find them easier to remember. Turn on “no repeated digits” for those. Know that it shrinks the choice: there are 5,040 four-digit PINs with no repeats against 10,000 in all, and 151,200 six-digit ones against a million. Leave it off unless a system asks for it. With no repeats, a PIN can be at most 10 digits long.

How to use a PIN well

  • Never use a date. Birthdays, anniversaries and years are guessed early, and often easy to look up.1
  • Use different PINs. Your phone, your bank card and your SIM card should not share a PIN.
  • Cover the keypad when you type it in public. A random PIN does not help against someone watching.
  • Change it if you think someone has seen it.
  • Do not write it next to the card or device it unlocks. Keep it in a password manager if you need a copy.

Questions about PINs

How do I generate a random 4 digit PIN?

Set the length to 4 with the button above and the generator shows a random 4 digit PIN right away. Press Generate another for a new one, or choose 5 or 10 to get several at once. Easy PINs like 1234 and 1111 are skipped unless you turn that off.

Is this PIN generator safe to use?

Yes. The PIN is made in your browser with its secure random number generator. The page does not send it anywhere, save it or log it, and it still works if you go offline after the page loads.

How many 4 digit PIN combinations are there?

10,000, from 0000 to 9999. With no repeated digits there are 5,040. This generator skips 423 easy ones by default, which leaves 9,577.

How many 6 digit PIN combinations are there?

One million, from 000000 to 999999. With no repeated digits there are 151,200.

What are the most common PINs?

In an analysis of almost 3.4 million four-digit passwords from leaked lists, the most common were 1234, 1111, 0000, 1212 and 7777. 1234 alone was nearly 11 percent, and the top 20 covered 26.83 percent.

Is a 6 digit PIN more secure than a 4 digit PIN?

Yes, by a factor of 100. With 10 tries, someone guessing a random 4 digit PIN has a 1 in 1,000 chance, and a 1 in 100,000 chance against a random 6 digit PIN. NIST says PINs that unlock a device should be at least 6 digits.

Should a PIN have no repeated digits?

Only if a system requires it. Banning repeats removes possible PINs, so it makes a random PIN easier to guess, not harder: 5,040 four-digit PINs instead of 10,000. What matters is that the PIN is random and not an easy pattern.

What is the least common PIN?

There is no safe least common PIN. Once a code is published as rare, people pick it and guessers try it. The safest PIN is one picked at random, like the ones this generator makes.

Sources

  1. DataGenetics, PIN number analysis, 17 September 2012.
  2. NIST, SP 800-63B-4, Digital identity guidelines: authentication and authenticator management, activation secrets.

More free tools