Random 3-Digit Number Generator
Why is this truly random?
This generator uses the Web Crypto API, the same cryptographic engine that secures HTTPS connections and encrypts your passwords. Unlike Math.random(), which relies on a predictable pseudorandom algorithm, crypto.getRandomValues() draws entropy from your operating system — hardware noise, interrupt timing, and other unpredictable physical sources.
The result is a number that is statistically uniform and cryptographically secure, meaning no one can predict the next value even if they know every previous one.
Use cases
- Generate a random area code or extension number
- Create a short numeric identifier for orders or tickets
- Pick a random locker, room, or seat number
- Generate random HTTP status codes for testing (100–599)
- Assign random three-digit employee or student IDs
- Create a random combination for a 3-digit lock
How it works
- Your browser generates a cryptographically secure 32-bit unsigned integer
- The integer is mapped to the range 100–999 using modular arithmetic
- The result is always exactly 3 digits — no leading zeros, no truncation
Everything runs locally in your browser. No data is sent to any server, and no numbers are stored or logged.
Frequently asked questions
What range does this generate?
Numbers from 100 to 999 — all possible 3-digit numbers. That gives you 900 equally likely outcomes.
Can I get numbers with leading zeros like 042?
No. This generator produces numbers from 100 to 999, so the first digit is always 1–9. If you need 3-digit codes with leading zeros, use the password generator instead.
Is every number equally likely?
Yes. Each of the 900 possible 3-digit numbers has an equal probability of approximately 0.111% per generation.
Is this safe to use as a lock combination?
The generation is cryptographically secure. However, a 3-digit combination has only 900 possibilities, which can be brute-forced quickly. Use longer codes for high-security needs.
Probability distribution
Each number from 100 to 999 has an exactly equal probability of being selected. The probability of any single outcome is:
The probability of generating a specific number twice in a row is approximately 1 in 810,000 — extremely unlikely, but not impossible with true randomness.
Common scenarios
Lock combinations
Many luggage locks, padlocks, and bike locks use 3-digit combinations. Generating one randomly is far more secure than choosing a birthday or repeated digits, which are the first combinations an attacker will try.
Order and ticket numbers
Three-digit numbers are short enough to communicate verbally and long enough to avoid frequent collisions in small batches. Use them for deli counters, event check-ins, or support tickets.
Area codes and extensions
Phone area codes and office extensions are typically three digits. Generate random ones for mock data, testing VoIP systems, or building phone number formatters.
Games and competitions
Assign random three-digit bib numbers for races, create secret codes for scavenger hunts, or generate target numbers for number-guessing games.
Privacy and security
Your generated numbers never leave your device. This tool runs entirely in your browser using client-side JavaScript — no API calls, no server logs, no cookies, and no tracking of generated values. The source code is fully transparent and can be inspected in your browser's developer tools.
Sources of entropy
Entropy is the raw unpredictability that fuels random number generation. Different systems harvest entropy from different sources:
Hardware noise
Thermal noise in electronic circuits, clock jitter, and voltage fluctuations. This is what most operating systems use, including the entropy pool behind the Web Crypto API.
Atmospheric noise
Radio static from thunderstorms and electromagnetic interference. Services like RANDOM.ORG use this approach, capturing atmospheric noise via radio receivers.
Radioactive decay
The timing of individual atomic decay events is fundamentally unpredictable according to quantum mechanics. Some dedicated hardware RNGs use Geiger counters for this purpose.
User input
Mouse movements, keystroke timings, and touchscreen interactions contribute to the OS entropy pool. The precise microsecond timing of these events is unpredictable enough to be useful.