About PIN Generator
Create PINs for a phone, a door keypad, a card or a voicemail box, drawn from your browser’s cryptographic random number generator. Choose how many digits you need, and make as many PINs at once as you like.
People guess PINs by trying the patterns everyone else picks first: straight runs, repeated digits and short repeated pairs. With the check on, any code like that is thrown away and a fresh one is drawn, so the codes that remain are still equally likely. Nothing you generate leaves this page.
How it works
- Each digit is chosen with crypto.getRandomValues, using rejection sampling so every digit from 0 to 9 is exactly equally likely.
- With “Skip easy-to-guess PINs” on, a code is rejected if it counts straight up or down (1234, 8901, 6543), repeats a shorter block (1111, 1212, 123123), or has the same digit three times in a row (5550).
- Rejected codes are redrawn from scratch rather than altered, so every code that passes the check has the same chance of being chosen.
- With “Use each digit once”, digits are drawn without replacement, which is how some keypads and safes require codes to be set.
Questions
Is a 4-digit PIN safe?
Only where the device locks or wipes itself after a few wrong attempts. There are just 10,000 four-digit codes. Six digits give a million, and anything that can be tried offline should use a password instead.
Does skipping weak PINs make them easier to guess?
It removes 3% of 4-digit codes and under 6% up to 8 digits, which costs less than a tenth of a bit of entropy. Longer PINs contain more triple runs, so at 20 digits it removes about 15 percent of codes, still only a quarter of a bit. In exchange it rules out exactly the codes an attacker tries first.
Does it avoid birthdays and years?
No. It does not try to recognise dates, because nearly every four-digit code can be read as some date. It rejects only the run, repeat and triple-digit patterns listed above.
Are the PINs stored or sent anywhere?
No. They are created in your browser and exist only on this page until you copy or download them or close the tab.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.