Random PIN generator
Generate random PINs from 4 to 12 digits, one or many at once, skipping 0000, 1234, dates and repeated digits. Free, and nothing is stored.
- Free
- No sign-up
- No file uploaded
- Windows, Mac, Android, iPhone
Loading the tool…
Share this tool
About this tool
Choose how many digits and how many PINs you want and the generator draws them with your browser's cryptographic random number generator. The "Avoid weak PINs" option rules out the codes everyone tries first: 0000, 1234, birthdays, years, repeated digits and keypad patterns. You can also check a PIN you already use.
When to use it
SIM card, phone or tablet
Replace a default SIM PIN or your phone's lock code with one that doesn't look like your date of birth.
Door codes, padlocks, safes and alarms
For a code you share with family or a team, a 6-digit PIN with no pattern is far safer than 1111 or the year the building went up.
Batches of temporary codes
Generate dozens of distinct codes at once for lockers, guest access or testing, then copy them all in one go.
How to use
- Choose the number of digits (4 to 12).
- Set how many PINs to generate.
- Leave the weak-PIN option on.
- Copy the PIN and set it where you need it.
How it works
Each digit comes from crypto.getRandomValues, the browser's cryptographic random generator. With the option on, a PIN is thrown out if it's one of the most used codes, has only two different digits or repeats a pattern, forms a run (1234, 9876) or can be read as a date or year.
Ruling those out removes a small share of the possible combinations, but mostly the ones a thief would try first. PINs are never sent or saved and disappear when you close the page.
Tips for best results
- Use 6 digits instead of 4 when the device allows it: that's a hundred times more combinations.
- Don't use the same PIN for your SIM, your phone and your bank card.
- Don't write the PIN on the thing it protects, or text it to anyone.
- If you need to keep it, store it in a password manager.
- Bank card PINs are set by your bank; follow its process to change one.
Common problems and fixes
I forget the PINs I generate
Save the PIN in a password manager before you use it, or generate several and pick the one that sticks.
My device only accepts 4 digits
Set the length to 4 and keep the weak-PIN option on: that's the best you can do with 4 digits.
My current PIN is flagged as weak
It looks like a date, a run or a very common code. Change it in the device's settings.
Frequently asked questions
Are the PINs truly random?
Yes. They come from the browser's cryptographic generator, not from Math.random, which is predictable.
Are generated PINs stored?
No. They stay in the page and are never sent. Only your settings (length, count) are kept on this device.
What makes a PIN weak?
Being guessable in a few tries: 1234, 0000, 1111, a year, a birthday, or a keypad pattern like 2580.
How many combinations does a 4-digit PIN have?
10,000, from 0000 to 9999. A 6-digit PIN has a million.
Related searches
Still stuck?
Ask on the forum: the category, the tool, your device sheet and the test result will be filled in for you.