Random Number Generator: Integers, Decimals & Cryptographically Secure
Free random number generator using the Web Crypto API. Pick one number or generate lists of random integers or decimals in any range. Single Number mode for “number between 1 and 100”; List/Advanced for count, precision, and optional no-duplicates. No sign-up, runs in your browser.
What This Tool Does and Who It’s For
- Who it’s forTeachers running class draws, developers needing test data or random sampling, researchers doing randomisation, or anyone running a small lottery or game. The same secure source backs both modes.
- Fairness and privacyEvery value in the range has equal probability (uniform distribution). All generation happens in your browser; nothing is sent to a server.
Where the Numbers Come From: Crypto vs Pseudo-Random
- Uniform mappingRaw random bytes are mapped to your range so each integer (or decimal) has the same probability. For integers in a range of size n, each outcome has probability .
- When to use whatUse this generator when you need “fair” random numbers for people (e.g. picking a winner). For passwords or secret keys, use a dedicated password generator. For reproducible research, use a PRNG with a fixed seed in your own code.
crypto.getRandomValues()), which draws from your device’s cryptographically secure random source—the same kind used for keys and tokens. The sequence isn’t predictable from previous outputs, so it’s suitable for fairness-sensitive uses like raffles or sampling.Single Number Mode: One Integer in a Range
List/Advanced Mode: Count, Precision, and Duplicates
Uniform Distribution and What “Random” Means Here
Random Number Generator FAQ
? How does this random number generator work?
crypto.getRandomValues()), which pulls from your device’s cryptographically secure random source—the same one used for encryption keys and security tokens. Integers are mapped to your chosen range so each value has equal probability; decimals are scaled to your lower and upper bounds with the precision you set.