PIN generator
A random PIN. Not your birthday.

From 4 to 12 digits, drawn by the Web Crypto API with the obvious ones skipped: no 1234, no 0000, no repeating pairs and no years. For a phone, a bank card, a SIM card or a door code.

Very strong

Calculating…

Why random

Thieves try your favorite PIN first.

A well-known analysis of 3.4 million four-digit PINs found that 1234 alone made up about 1 in 9 of them, and that the 20 most common PINs covered about a quarter. Birth years and dates came next.

Never generated here

  • Repeated digits: 0000, 7777
  • Runs: 1234, 6789, 9876
  • Repeating pairs: 1212, 6969
  • Years from 1900 to 2099 (4 digits)

Still yours to avoid

  • Your birthday or a relative's (0412, 2803)
  • The end of your phone number
  • Your street number or postal code
  • The same PIN on your card and your phone

The odds

4 digits or 6? Do the math.

A PIN is only safe because the device stops the guessing. Here are the chances that a thief guesses a random PIN before the lockout.

PIN lengthPossible PINsOdds with 3 triesOdds with 10 tries
4 digits10,0001 in 3,3331 in 1,000
5 digits100,0001 in 33,3331 in 10,000
6 digits1,000,0001 in 333,3331 in 100,000
8 digits100,000,0001 in 33,333,3331 in 10,000,000

These odds hold for a random PIN. In the same analysis, three guesses (1234, 1111 and 0000) would have opened almost 1 card in 5.

Where a PIN belongs

Short codes, behind a lockout.

Phone and tablet

Use 6 digits or more. Phones add delays after wrong attempts, and an iPhone can erase itself after 10 failures (Settings, Face ID & Passcode, Erase Data).

Bank card

Card PINs are usually 4 digits and the card is blocked after 3 wrong tries. A random PIN keeps a thief's odds at 3 in 10,000 instead of almost 1 in 5.

SIM card

A SIM PIN protects your phone number if the phone is stolen, and with it the text-message codes of your accounts. After 3 wrong tries the SIM asks for the PUK code from your carrier.

Not for websites

Online accounts face bots and leaked databases. Use a random password or a passphrase there. Windows Hello PINs are the exception: they never leave the device and its TPM chip limits the guesses.

Questions

PIN FAQ

Is a 6-digit PIN safer than a 4-digit PIN?

Yes, 100 times safer: there are 1,000,000 possible 6-digit PINs against 10,000 with 4 digits. With 10 tries before lockout, a thief's chance drops from 1 in 1,000 to 1 in 100,000.

Which PINs should I avoid?

Anything with a pattern or a link to you: 1234, 0000, 1111, 1212, birth years, dates, and digits from your phone number or address. The generator skips repeats, runs, repeating pairs and years automatically.

How do I remember a random PIN?

Use it several times right after setting it: muscle memory does the rest within a day or two. You can also keep it in your password manager. Never write it on the card or slip it into the phone case.

Why does the generator skip some PINs?

Because thieves try them first. For 4 digits the filter removes 318 of the 10,000 combinations (repeated digits, runs like 1234 or 9876, repeating pairs and the years 1900 to 2099), so the PIN stays random while avoiding the worst picks.

Can I use a PIN instead of a password?

Only where hardware limits the attempts: a phone, a bank card, a SIM card, or a Windows Hello PIN tied to your device's TPM chip. On websites, use a random password, a passphrase or a passkey.