← All tools/Generators/Security/PIN Generator

PIN Generator

Random PINs with no easy guesses, made entirely in your browser.

PINs

Every digit comes from your browser’s secure random number generator. Nothing is uploaded or stored.

First PIN

—

    How it works

    Each digit = one random digit from 0 to 9, drawn with crypto.getRandomValues().
    Easy guesses rejected (when switched on) = all digits the same (0000, 1111) and straight runs up or down (1234, 4321, 7890).
    Entropy = length × log2(10) ≈ 3.32 bits per digit. A 6-digit PIN has 6 × 3.32 = 19.93 bits.
    Combinations = 10^length. A 6-digit PIN has 10^6 = 1,000,000 possible combinations.

    Worked example: A 6-digit PIN such as 482916 has 1,000,000 possible combinations (10^6) and 19.93 bits of entropy. A 4-digit PIN has only 10,000 combinations and 13.29 bits, which is why a 6-digit PIN is the safer default for a phone or card.

    Frequently asked questions

    How long should my PIN be?

    Six digits is a good default — 1,000,000 combinations is far harder to guess than a 4-digit PIN’s 10,000. Use 8 digits where the device allows it, for 100,000,000 combinations.

    What counts as an easy guess?

    All digits the same (0000, 1111) and straight runs up or down (1234, 4321, 7890). These are the first PINs anyone guessing will try, so the generator rejects them when the option is switched on.

    Why is a random PIN safer than my birth year?

    A birth year or a familiar date is something other people can find out about you. A random PIN has no link to your life, so guessing it means trying every combination.

    Does the generator store my PINs?

    No. The PINs are made in your browser and shown only to you. Nothing is uploaded, saved or logged, so write your PIN down somewhere safe yourself.

    What does entropy mean here?

    Entropy measures how hard a PIN is to guess, in bits. Each digit adds about 3.32 bits, because there are 10 possible digits and log2(10) is 3.32. More bits means more combinations to try.

    More tools

    Tell us what you think

    Loving this tool, or stuck on something? Tell us — it takes a minute.

    We’ll only use your name and email to reply if needed. The tool and page are filled in for you.