5 Digit Random Number Generator
Five-digit values from 00000 to 99999 for codes, IDs and sample records.
Generated numbers
Your numbers will appear here. Press Generate to start.
Generate random five digit numbers between 00000 and 99999. Five digits sits in a useful middle ground: a hundred thousand combinations is roomy enough for internal IDs, coupon codes and order references, while still being short enough for someone to read down a phone line without losing their place.
Why use this tool?
Fixed five characters
Zero-padding keeps every result exactly five characters wide, so they line up in columns and import cleanly.
No collisions
Unique mode guarantees a batch of distinct values, which is what you need when the number is acting as an identifier.
100% private
Generation happens in your browser using the Web Crypto API. Nothing is sent to a server, nothing is logged, and there is no analytics script watching what you produce.
Sorted or shuffled
Keep the draw order, or sort ascending or descending to scan a long batch quickly.
How this 5 digit random number generator works
The generator requests entropy from the Web Crypto API rather than using Math.random(), so results cannot be reproduced by anyone who observes earlier output.
Entropy is mapped onto 0–99,999 using rejection sampling, which keeps the distribution uniform. A modulo shortcut would leave low numbers slightly over-represented; discarding the uneven tail avoids that.
With unique mode on, the tool tracks what it has already issued. For large batches relative to the range it switches to a partial shuffle, which is dramatically faster than redrawing against a nearly full set.
How to use it
Step 1: Set the quantity
Type how many five digit numbers you want, up to 10,000.
Step 2: Configure the batch
Choose whether values must be unique, whether to keep leading zeros, and how to sort the output.
Step 3: Generate and export
Press Generate, then copy a value, copy them all, or download CSV or JSON.
Example usage
- Coupon codes
- Two thousand unique five digit codes exported as CSV and uploaded to a promotions platform.
- Anonymised participant IDs
- One unique number per study participant, replacing names in the dataset before it is shared.
- Sample postal-style codes
- Filler five digit values for a design mock-up, so layouts are tested against realistic character widths.
Frequently asked questions
How many 5 digit numbers exist?
Exactly 100,000, counting 00000 through 99999. If you require unique values, that is the hard ceiling on a batch.
Can I use these as unique IDs?
For small internal sets, yes — with unique mode on. For anything that grows over time, remember that separate generations do not know about each other, so check new values against your existing records or move to a six digit range.
Why do results keep their leading zeros?
So that every code is the same width. 00427 and 84213 are both five characters. Turn padding off if you would rather have plain integers.
Is there a limit per batch?
10,000 numbers per generation. Repeat as often as you need — there is no rate limit and no account.
Does this work offline?
Once the page has loaded, yes. All generation is local, so it keeps working if your connection drops.
Related tools
4 Digit Random Number Generator
Random codes from 0000 to 9999, zero-padded and ready to use as PINs or verification codes.
6 Digit Random Number Generator
Six-digit codes from 000000 to 999999 — the standard shape for one-time passcodes.
3 Digit Random Number Generator
Short three-digit values from 000 to 999 for quick codes and classroom use.
Browse every tool in Random Number Generators & Number Tools.