🔢 PIN Generator

Generates random numeric PINs. The most common 4-digit PINs (like 1234, 0000, birth-year patterns) account for a disproportionate share of real-world PIN use — this tool can skip the worst offenders when generating 4-digit codes.

How much a PIN is worth

Digits are drawn with rejection sampling on crypto.getRandomValues, so all ten are equally likely and there is no modulo bias. Each carries log2(10) bits:

bits = length x log2(10) = length x 3.3219

4 digits =    10,000 combinations = 13.3 bits
6 digits = 1,000,000 combinations = 19.9 bits

Two extra digits multiply the search by 100 but add only 6.6 bits, which shows how little a numeric keypad gives you. A 4-digit PIN survives on the lockout after three wrong tries, not on its own strength.

The weak-PIN filter

Birth years are the other big cluster and nothing filters them: 1987 is not on the list, so reject any PIN that looks like a date to someone who knows you. Generation happens in your browser and no PIN is transmitted or stored.

Frequently asked questions

How many combinations does a 4-digit PIN have?

Exactly 10,000, from 0000 to 9999. Real PINs are nothing like evenly spread across them: in published breach analyses, 1234, 1111 and 0000 alone account for close to a fifth of all PINs chosen by people.

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

A hundred times harder to guess exhaustively, 19.9 bits against 13.3. Where a device allows only a few attempts the practical gain is smaller, but there is no reason to refuse it.

What makes a PIN weak if it is not on the blocklist?

Predictability to someone who knows you. Birth dates, house numbers, the last four of a phone number and keypad shapes are all tried long before anyone works through 10,000 options.