Random 4 Digit Number Generator

Get one to fifteen random numbers from 1000 to 9999, each on its own card with a copy button.

The Random 4 Digit Number Generator gives you between one and fifteen whole numbers from 1000 to 9999, each on its own card with a copy button. That's 9,000 possible values, every one equally likely. It does one thing and does it immediately; there are no ranges to set, no seeds and no sign-up.

How it works

Enter how many numbers you want (1 to 15) and press Generate Number. Each number is drawn independently, so with a large batch you can occasionally get the same number twice, the same way you can with dice. Click the copy icon on any card to put that number on your clipboard. Press Generate again for a fresh batch.

The range starts at 1000, not 0000. If you need a four-character code that can start with a zero (a 0000-to-9999 style PIN or OTP), pad the result yourself or use the Random Number Generator with a range of 0 to 9999 and add leading zeros. For longer codes, the Random 5 Digit Number Generator and Random 6 Digit Number Generator work the same way.

Ways people use it

  • A PIN that isn't your birthday. Four-digit PINs are the norm for phones, cards and door keypads. The most common real PINs (1234, 1111, 0000, 2580 and any year from 1950 to 2010) are guessed first; a random draw dodges all of them.
  • Luggage and gym locks. Most combination padlocks are four wheels. Generate one, set the lock, write the number down somewhere that isn't the lock.
  • Test data. Fifteen four-digit IDs, order numbers or extension numbers to fill a form or a spreadsheet during development.
  • Raffle tickets and bingo. Draw the winning ticket number, or pick numbers for a "guess the code" game.
  • Lucky numbers. People ask for a 4 digit lucky number for lottery picks (Pick 4 style games use exactly this format). It's as lucky as any other four digits, which is to say the odds are 1 in 10,000 on a 0000-to-9999 game; this tool covers the 1000-to-9999 part of that range.

How random is it, and is it safe for a PIN?

The numbers come from your browser's built-in random number function, which is fine for games, sampling, test data and picking a lock code. It is not a cryptographic random source. For a bank card PIN or anything protecting money, a random draw from here is a big improvement over 1234, but the real protection comes from not reusing it and not writing it on the card. If you want numbers with a specific mathematical property instead, the Random Prime Number Generator and Random Binary Number Generator are in the same section.

Four-digit numbers in everyday use

A few formats that happen to be four digits, in case that's what brought you here: US bank card PINs and most phone lock codes (4 or 6 digits); luggage and bike lock combinations; the last four of a US Social Security or phone number used as an identity check; hotel room and PBX extension numbers; Pick 4 lottery draws; and short verification codes in older SMS systems, though most services now send six. This generator produces plain numbers, not any of those things specifically, so it won't validate against a real card or account. For every kind of number picker on the site, see all number generators.

Frequently asked questions

What range does the 4 digit number generator use?

1000 to 9999 inclusive, so every result is a true four-digit number with no leading zero. That is 9,000 possible values with equal probability.

Can I get a code starting with 0, like 0042?

Not from this tool, since it starts at 1000. Use the Random Number Generator with a 0 to 9999 range and pad with leading zeros.

Will the numbers in one batch be unique?

Not guaranteed. Each number is drawn independently, so duplicates are possible but rare: in a batch of 15 there is roughly a 1 percent chance of any repeat.

Is it safe to use a generated number as my PIN?

It is far better than a birthday or 1234, and there is no record of what the page generated. The browser's random function is not cryptographic-grade, though, so treat it as a good everyday PIN, not a secret key.

How many numbers can I generate at once?

Up to 15 per press. Press Generate again for another batch.