Skip to content

Random PIN generator

Make a random numeric PIN for a bank card, phone lock screen, SIM card, door keypad, alarm panel or app passcode. Choose 4 to 12 digits and the tool can skip the PINs people pick most often, such as 1234, 0000, birth years and dates, so your code is not among the first guesses. Everything happens in your browser; no PIN is ever sent to us.

Quick answer

To get a safe PIN, generate one at random rather than choosing it, and keep the three filters on so it is not a common PIN, a year, a date, a repeated digit or a run like 123. A random 4-digit PIN then has about 6,350 possibilities, and a 6-digit PIN about 480,000.

4 digits
Skip PINs that are easy to guess
How many PINs

Made on your device with crypto.getRandomValues. PINs are never uploaded, logged or saved.

 

about 0.0 bits of randomness

A PIN is safe only because the card or phone locks after a few wrong tries. Never use the same PIN for your bank card and your phone.

    How to use the PIN Generator

    1. Choose the PIN length the card, phone or keypad asks for, using the slider or the 4, 6 and 8 buttons.
    2. Keep the three filters on unless the device needs something special; they remove the PINs attackers try first.
    3. Press Copy next to the PIN, or pick 10, 50 or 100 and use Copy all or Download .txt for a list. Set the new PIN on the device straight away and close the page.

    Why people’s own PINs are easy to guess

    When people choose a PIN, they lean on the same few ideas: 1234, 0000, 1111, a birth year, a wedding date, or the straight line 2580 down the middle of a phone keypad. A widely cited analysis of about 3.4 million leaked four-digit codes found that roughly a quarter of them were one of just 20 combinations. A thief with your wallet or phone gets only a few tries, so those few tries matter. A PIN drawn at random by a computer is no more likely than any other, which is exactly what you want.

    What the three filters remove

    Repeated digits removes any PIN with a digit next to itself, such as 1135, or a digit used three or more times. Runs and patterns removes three digits counting up or down, such as 345 or 987, and codes made of one short block repeated, such as 1212 or 123123. Common PINs removes a list of well-known codes, every year from 1900 to 2099, and anything that reads as a day and month, such as 0512 or 3107, along with six- and eight-digit dates. The panel shows how many PINs are left, so you can see the cost: for four digits about 6,350 of 10,000 remain.

    How random PINs are made here

    Each digit comes from crypto.getRandomValues, the secure random generator built into your browser, with rejection sampling so that every digit from 0 to 9 is equally likely. If a PIN fails a filter it is thrown away and a new one is drawn, so the PINs that pass are all equally likely too. Bulk lists contain no duplicates. Nothing is stored or transmitted, and the analytics this site uses record only which settings you used, never a PIN.

    Choosing the length

    Four digits is the norm for bank cards and many SIM cards, and it is safe because the card blocks itself after a few wrong attempts. If your phone, banking app or alarm lets you choose, six digits gives a hundred times more combinations at almost no extra effort. Eight digits or more suits door codes and safes that do not lock out after wrong guesses, though for a phone a longer alphanumeric password or passphrase is stronger still.

    Keeping your PIN safe

    Never write the PIN on the card or keep it in the same wallet, and do not send it by text message or chat. Cover the keypad with your other hand at cash machines and shop terminals. Banks and genuine customer service staff never ask for your PIN, by phone, message or email; anyone who does is attempting fraud. If you think someone has seen your PIN, change it at a cash machine or in your banking app straight away.

    Frequently asked questions

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

    A 6-digit PIN has 1,000,000 combinations against 10,000 for four digits, so it is a hundred times harder to guess. Both are safe on a card or phone that locks after a few wrong attempts, but choose six digits wherever the device allows it.

    Why does the tool skip PINs like 1990 or 0505?

    Years and dates are among the first codes a thief tries, because so many people use a birthday or anniversary. 1990 reads as a year and 0505 as the fifth of May. Skipping them costs a little randomness but takes your PIN out of the most likely guesses.

    Should I use a PIN from this PIN generator for my bank card?

    Yes, a random PIN is better than one you choose. Generate it here, then change the card PIN at your bank’s cash machine or in its app. Do not save it in notes or photos, and use a different PIN for your phone so one leak does not expose both.

    How can I remember a random PIN?

    Say it as two pairs or as a short rhythm, such as 47 then 93, and use it several times on the first day. Many people find that the finger pattern on the keypad sticks quickly. If you must keep a reminder, store it in a password manager, never next to the card.

    Can I make a list of unique PINs for staff or door codes?

    Yes. Choose 10, 50 or 100 and every PIN in the list is different. Copy all of them or download a .txt file to hand out first-use codes, then ask each person to change theirs. For codes that stay in use, prefer 6 digits or more.