About the Random 4 Digit Number Generator
Most number tools treat 0042 as 42 and quietly hand back a three digit string. This one draws four digits independently and joins them, so the full range from 0000 to 9999 is available and a leading zero survives. That is what you need for a PIN, a locker code, a ticket stub, a test fixture or anything else where the width is fixed.
Each digit comes from the browser cryptographic random source, which means the output is not seeded and not reproducible, and every one of the ten thousand codes is equally likely. Turn off repeats when you are simulating draws, or leave it on when you need a set of distinct codes for a class, a raffle or a batch of test accounts.
A word of caution about real PINs: a four digit code has only ten thousand possibilities, so it is fine as a device unlock backed by a lockout counter and useless as a standalone secret. For an account password use the Password Generator. For a longer numeric code the Random 6 Digit Number Generator adds two digits, and for a different span the Integer Range Generator covers preset ranges.
How to use
- Set how many four digit codes you need, up to 200.
- Keep No repeats on when every code has to be distinct.
- Press Generate and Copy the column straight into a spreadsheet.
- Download the list if you are printing tickets or labels.
Common questions
- Does it include numbers like 0042?
- Yes. Leading zeros are kept, so the full 0000 to 9999 range is available and every code is four characters wide.
- Is this safe for a bank PIN?
- A four digit code has ten thousand options, which only works when a lockout limits guesses. Never reuse a generated code across accounts.
- Can I get more than 200 at once?
- Two hundred is the cap per batch. Press Generate again for another batch, or turn repeats off for up to ten thousand unique codes across runs.
- How random are the numbers?
- Each digit uses the browser cryptographic random source, so the output is unseeded and cannot be predicted from an earlier batch.