Random 4 Digit Number Generator
Generate random 4-digit numbers and PINs, 6-digit codes or numbers of any length from 1 to 12 digits, with leading zeros, unique digits and weak-PIN filtering.
Generate random 4-digit numbers and PINs, 6-digit codes or numbers of any length from 1 to 12 digits, with leading zeros, unique digits and weak-PIN filtering.
Leave Digits on 4 and press Generate. With leading zeros allowed every code from 0000 to 9999 is possible, 10,000 in all, each with the same chance. Choose Not allowed if the number must be a true four-digit number from 1000 to 9999 (9,000 possibilities). Set How many to generate a list, up to 10,000 at once; with No repeats ticked, a list of 10,000 is every 4-digit code in a random order.
The 4-digit PIN preset ticks Skip weak PINs, which throws away codes people guess first: repeated digits like 1111, runs like 1234 or 9876, repeated pairs like 1212, the most common PINs such as 2580 and 6969, years from 1900 to 2039 and month-day dates like 0714. Tick Every digit different for codes like 3918 where no digit repeats. For a real bank card or phone, choose your own PIN privately rather than one shown on a screen.
Set Digits to 6, or use the 6-digit number preset, for values from 000000 to 999999: one million possibilities. The 6-digit code preset also skips weak codes such as 123456, 111111 and 121212, which makes it handy for sample verification codes, OTP mock-ups, ticket numbers, lottery-style draws and test data. Show as Grouped formats them as 482-719.
| Digits | Range with leading zeros | Possible values | Typical use |
|---|---|---|---|
| 3 | 000 to 999 | 1,000 | Lock combinations, CVV-style test values |
| 4 | 0000 to 9999 | 10,000 | PINs, door codes, raffle numbers |
| 5 | 00000 to 99999 | 100,000 | ZIP-like codes, order numbers |
| 6 | 000000 to 999999 | 1,000,000 | Verification codes, tickets |
| 8 | 00000000 to 99999999 | 100,000,000 | Reference numbers, test account IDs |
The .csv download writes each number as a text formula so spreadsheets keep leading zeros instead of turning 0042 into 42.
10,000 if leading zeros are allowed (0000 to 9999) and 9,000 if the first digit cannot be zero (1000 to 9999).
Yes. Use the 4-digit PIN preset. It skips weak PINs such as 1234, 1111, 1212, common patterns, years and dates. Pick your real bank or phone PIN privately.
Set Digits to 6 or click the 6-digit number preset, then press Generate. There are one million possible 6-digit numbers from 000000 to 999999.
Yes. Keep No repeats ticked and set How many, up to 10,000. The tool never returns more unique numbers than exist for the chosen length.
Yes. Tick Every digit different to get numbers such as 3918 or 507264 where no digit appears twice. That works for up to 10 digits.
Numbers come from the browser crypto.getRandomValues generator, so each digit is equally likely. Nothing is sent or stored.
Random Number GeneratorRandom String GeneratorRandom Phone NumberRandom ZIP CodeRandom Letter Generator