Random 4-Digit Number Generator
A fair random 4-digit number in one tap. Optionally allow leading zeros, or ask for a whole list.
- Free
- No sign-in
- Nothing leaves your device
- Works offline
In 3 steps
How to use it
Choose your style
Leave leading zeros off for a normal number, or switch them on for PIN-style codes.
Press Generate
Ask for one number or many.
Copy the result
Copy it in one tap. Nothing is stored.
Fast facts
Good to know
-
9,000 possible numbers
From 1,000 to 9,999, every one equally likely.
-
10,000 possibilities
A 4-digit code from 0000 to 9999 has 10,000 possibilities, about 13 bits of entropy. Fine for fun, far too small to protect a secret.
-
Repeats happen
Pick 5 numbers and there is a 0.11% chance that at least two match.
-
Good for
test PINs and codes, lottery-style picks, verification demos, random year-like values.
Ideas
What people use 4-digit numbers for
- test PINs and codes
- lottery-style picks
- verification demos
- random year-like values
FAQ
Random 4-Digit Number Generator: your questions answered
How do I generate a random 4-digit number?
Press Generate. The tool picks a whole number from 1,000 to 9,999, so it always has exactly 4 digits, with every one of those 9,000 numbers equally likely.
Can a 4-digit number start with zero?
Switch on “Allow leading zeros” to include 0000 to 0999, like a real PIN. Leave it off to get a number from 1000 to 9999.
How many 4-digit numbers are there?
There are 9,000 numbers with exactly 4 digits when the first digit cannot be zero, or 10,000 if leading zeros are allowed (from 0000 to 9999).
Can I get several 4-digit numbers at once without repeats?
Yes. Set “How many”, and switch on “No repeats” in the full generator on the home page if you need every number to be different.
Are the digits really random, and are they stored?
They come from your browser’s cryptographically secure random generator and are created on your device. They are never sent to us and never stored.
Keep going
More free tools
-
Random number generator
Any range, decimals, no repeats, up to 1,000 digits.
Open -
Random String Generator
Secure random tokens, hex keys and IDs with entropy shown.
Open -
UUID Generator (v4 & v7)
Bulk UUID v4 and time-sortable v7, entirely in your browser.
Open -
Online Dice Roller
d4 to d100, many dice, modifiers, advantage.
Open
Private by design. No accounts, no cookies, no tracking. Everything you generate stays on your device.
How we keep it that wayReady? Press the button.
Free, fast and private. No sign-in, ever.