Generate a random number between 1000 and 9999. Press the button for a fair, cryptographically random pick.
?
Minimum
1000
Maximum
9999
Possible
9,000
Each press picks one whole number from 1000 to 9999, inclusive. There are 9,000 possible outcomes and every one has an equal chance. This generator uses your browser's crypto.getRandomValues for unbiased, cryptographically secure randomness — better than Math.random() for picks that need to be fair.
Producing large random identifiers, seed values for scientific simulations, statistical sampling from large populations, or cryptographic nonce generation.
With 9,000 equally-likely outcomes, the probability of any specific number being chosen is 1/9,000 (0.0111%). Unlike pseudo-random generators that use a deterministic seed, crypto.getRandomValues sources entropy from your operating system's hardware random number generator (e.g., thermal noise, CPU jitter), making the output unpredictable even to an attacker who knows the algorithm. This makes it suitable for fair draws, contests, and any scenario where bias or predictability would be a problem.
Math.random() uses a pseudo-random algorithm (typically xoshiro128 or similar) seeded from a system source — fast and fine for most purposes, but its output is deterministic given the seed and can exhibit subtle biases when mapped to integer ranges via modulo. This tool uses crypto.getRandomValues with rejection sampling to guarantee uniform distribution without modulo bias, at negligible performance cost for single picks.