How to use this generator
- Choose 0000–9999 to allow leading zeros, or 1000–9999 to exclude them.
- Select Generate to draw one result.
- Copy the four digits or generate another result.
Examples
- In 0000–9999 mode, 0047 is a valid result and keeps its two starting zeros.
- In 1000–9999 mode, 5821 is valid but 0047 cannot appear.
Digits versus whole numbers
The default mode displays every result with exactly four characters. It includes 10,000 possible strings, from 0000 to 9999. Excluding leading zeros leaves 9,000 possible integers, from 1000 to 9999. Each eligible result has the same chance per draw.
Useful for mockups and games
Use this for sample codes, numbered prompts or casual games. Results may repeat; they are not reserved identifiers. Four digits provide a small set of possibilities, so use the Password Generator for a longer account password.
Common questions
Why does Copy keep the zeros?
The result is displayed and copied as text. A spreadsheet may remove starting zeros unless you format the destination as text.
Are results guaranteed to be unique?
No. Each draw starts from the full selected range.
No account is needed. Inputs and results stay in your browser; optional analytics counts usage without collecting them.