Random Number Generator

Free online random number generator. Pick a number between any min and max, generate single picks or lists, with custom step size and delimiters. Crypto-grade.

How are random numbers generated?

There are two families: true random numbers and pseudo-random numbers. The difference matters more than most people realize.

True randomness comes from physical processes that cannot be predicted even in principle — radioactive decay timing, atmospheric noise sampled by a microphone, thermal noise inside a CPU's ring oscillators. The randomness is fundamental, not just opaque. Hardware random number generators on modern chips (Intel's RDRAND, AMD's RDRAND, ARM's TrustZone) feed entropy directly from these sources.

Pseudo-randomness comes from deterministic algorithms — Mersenne Twister, xorshift, PCG, ChaCha20. Given the same seed, they always produce the same sequence. They are extremely fast and have excellent statistical properties (passing tests like Diehard and TestU01), but they are not unpredictable to anyone who knows the algorithm and the seed. The browser's crypto.getRandomValues mixes pseudo-random output with operating-system entropy and re-seeds frequently, which is why it is considered cryptographically strong even though it is technically a pseudo-random generator.

Why does the difference matter?

Cryptography: encryption keys, session tokens, and TLS handshakes need unpredictability. A flaw in the random source can break the whole system — see the 2008 Debian OpenSSL bug where weak randomness made ~250,000 SSH keys guessable.

Fairness: in gaming, gambling, and lotteries, predictable randomness is exploitable. Certified RNGs (the kind used by regulated casinos) require both cryptographic strength and audit trails.

Simulation: Monte Carlo methods in physics, finance, and machine learning train on huge volumes of random numbers. Speed matters more than crypto-strength here — most researchers use Mersenne Twister or PCG, with a fixed seed for reproducibility.

Security tokens: password reset links, API keys, and 2FA secrets must be unpredictable. A weak generator here is silent — nothing breaks visibly, but attackers can guess the token.

Sampling: in surveys and statistics, every population member must have equal probability of selection. A biased generator produces biased data, and the bias often is not visible until the conclusion is already wrong.

About the Random Number Generator

Pick a number between any minimum and maximum — or generate a whole list of them at once. This generator uses your browser's cryptographically-strong randomness source (crypto.getRandomValues, the same primitive that produces TLS session keys) rather than the older Math.random, which is fast but predictable enough that a determined attacker can rebuild its internal state after seeing a few outputs. For day-to-day picks — "who goes first", "which restaurant tonight", a lottery draw at the office — Math.random is fine. For anything where prediction would matter, the crypto source is the right default.

The step setting controls the spacing of allowed values. Step 1 with range 1-10 gives integers 1, 2, 3, ... 10. Step 0.5 with the same range gives 1, 1.5, 2, 2.5, ... 10. Step 2 with range 0-20 gives even numbers. Setting the list length over 1 turns single-shot mode into batch mode and joins outputs with your chosen delimiter — useful when you need quick sample data for testing.

Frequently Asked Questions

Yes — it pulls from crypto.getRandomValues, which the W3C Web Crypto API defines as cryptographically strong. In practice the browser delegates to the operating system's entropy pool (/dev/urandom on Linux/macOS, BCryptGenRandom on Windows), the same source used by TLS libraries and SSH key generators. Caveat: "suitable for crypto" means the entropy source is good; whether the use case is safe also depends on how you handle the output. Generating a 256-bit key here and pasting it into a public chat instantly defeats the purpose. For local one-off use (a strong password, a session token in your own app), this is the same quality of randomness a professional crypto library would use.

Not from this tool — crypto.getRandomValues is intentionally non-seedable so that outputs cannot be replayed. If you need reproducible randomness (statistical simulation, debugging, scientific work), use a seeded PRNG instead. In JavaScript, install mulberry32 or a similar small seeded generator and pass a fixed seed; same seed in always yields same sequence out. The trade-off: a seeded sequence is reproducible but anyone who learns the seed can replay it, so do not use seeded PRNGs for security.

Safely up to 2^53 - 1, or about 9.007 quadrillion (9,007,199,254,740,991). That is JavaScript's Number.MAX_SAFE_INTEGER — the upper bound of integers that can be represented exactly in a 64-bit float without rounding. Beyond that, integers start to lose precision (the gap between representable numbers exceeds 1). For most use cases — dice, lottery, percentages, financial values — this ceiling is irrelevant; it only matters for things like generating very large IDs or cryptographic nonces, where you would want a different tool anyway (BigInt-based or hex-string output).

Set min to 0, max to 1, and step to a small fraction like 0.01 or 0.001 depending on your needed precision. Step 0.01 gives you two decimal places (0.00 to 1.00). Step 0.001 gives three. If you want continuous uniform output (any real number in [0, 1)), the underlying primitive is Math.random — though for that exact use case, calling Math.random() yourself in console is often easier than going through this tool. For weighted or non-uniform decimals (Gaussian, exponential), you would need a specialized tool — this generator is uniform across the requested range.

Yes — by default, each generated number is independent, so duplicates are not just possible, they are likely. With range 1-10 and list length 10, you almost always get repeats and miss some values (this is the "birthday problem" in action). If you need a unique sample — like drawing 10 different numbers from 1-100 — what you really need is sampling without replacement, which this tool does not enforce. Workaround: generate more numbers than you need (e.g., 30 numbers from 1-100), then dedupe and take the first N. For shuffling or unique picks, a list shuffler or permutation tool is the right shape.

Math.random() is built for speed and statistical correctness, not for unpredictability. Different browsers historically used different algorithms — V8 (Chrome, Node) uses xorshift128+, SpiderMonkey (Firefox) uses xorshift; all are fast but have small (~128-bit) internal state. Researchers have shown that observing a few hundred consecutive outputs is enough to reconstruct the internal state and predict all future values. For games, animations, and shuffling a deck for a single-player offline experience, Math.random() is fine. For anything multiplayer, gambling-adjacent, or security-related, crypto.getRandomValues is the correct choice — and that is what this generator uses.

The generator produces values of the form min + k × step, where k is a non-negative integer, and clipped to ≤ max. So range 1-10 with step 3 produces values from the set {1, 4, 7, 10}, not arbitrary integers between 1 and 10. Range 0-1 with step 0.1 gives {0, 0.1, 0.2, ... 1.0}. If step does not evenly divide (max - min), the highest reachable value will be just under max — e.g., range 0-10 step 3 gives {0, 3, 6, 9} (10 is reachable only if it equals min + k × step for some k). Use step 1 for plain integer dice rolls.

No. Generation happens entirely client-side in your browser — the min, max, step, and resulting numbers never leave the page. We do not log, analytics-track, or transmit any of them. The only network activity from this page is loading the page's own assets (HTML, CSS, JS). Open the browser's Network tab before clicking Generate; you will see zero requests. This is why the tool is safe for cryptographic use — leaking a generated key would happen only if you copied it and pasted it somewhere insecure yourself.
Random Number Generator — Free online random number generator. Pick a number between any min and max, generate single picks or lists, with custom
Random Number Generator