Randomness is surprisingly hard to achieve. Computers are deterministic machines — given the same input, they produce the same output every time. "Random" numbers on a computer are almost always generated by a deterministic algorithm that looks random rather than being truly random. For most purposes this is fine. For some purposes — security, fair giveaways, statistical sampling — it matters a great deal.
A pseudo-random number generator (PRNG) uses a mathematical algorithm, seeded with an initial value, to produce a sequence of numbers that appear random but are entirely deterministic. JavaScript's Math.random() is a PRNG. The specific algorithm varies by browser engine (V8, SpiderMonkey, JavaScriptCore), but all of them are seeded from a small source of entropy at startup and are therefore predictable if you know the seed and the algorithm.
For generating a random number between 1 and 100 to decide who picks up lunch, Math.random() is perfectly adequate. The "unfairness" of knowing that the next output is mathematically determined from the last one is irrelevant in practice.
A cryptographically secure PRNG (CSPRNG) draws entropy from hardware sources — mouse movements, network timing, thermal sensor variation — and produces numbers that are computationally infeasible to predict even if you observe all previous outputs. The browser's crypto.getRandomValues() is a CSPRNG. It is the same quality of randomness used by password managers and encryption software.
Criply's random number generator uses crypto.getRandomValues() throughout — not Math.random(). This matters for:
The most common real-world use for a random number generator: picking a winner from a list of entrants. The right approach is the "pick from list" mode, not generating a random number and mapping it to a position manually — the latter introduces manual steps where error can creep in.
For a fair giveaway:
crypto.getRandomValues() and returns the top N entries.This approach is auditable: you can share the entrant list and demonstrate that the selection was random. Using a well-known algorithm with cryptographic entropy is the closest you can get to independently verifiable fairness without a dedicated third-party service.
Tabletop roleplaying games use dice far more complex than a standard d6. The standard set for games like Dungeons & Dragons includes d4, d6, d8, d10, d12, d20, and d100 (also called d%). Rolling multiple dice and summing the results — 3d6 (three six-sided dice), 2d8, 1d20 — is the core mechanic of most systems.
Physical dice are perfectly random enough for games, but they have practical problems: they roll off the table, get lost, and require you to have the right set on hand. A virtual dice roller handles any combination without the logistics.
Criply's dice roller shows each die result individually and the total — useful when you need to know individual rolls (e.g., for advantage/disadvantage mechanics where you roll 2d20 and take the higher or lower).
Common dice probability reference:
If you are sampling from a population for a survey, A/B test assignment, or any kind of research, the randomness quality of your sampling method affects the validity of your results. Pseudo-random sampling with a predictable PRNG can introduce subtle biases that are hard to detect.
For small-scale sampling — selecting 50 survey participants from a list of 500 — the "no duplicates" mode in the multiple numbers generator gives you a clean random sample. The tool uses an unbiased shuffle (Fisher-Yates with rejection sampling to avoid modulo bias) so every possible combination of 50 participants is equally likely.
Developers often need random data for testing: random user IDs, random prices in a range, random status codes, random delays for simulating network latency. The multiple numbers mode can generate up to 1,000 random integers in a range, which can be pasted directly into test fixtures or scripts.
For unique identifiers in test data, the UUID generator is the better tool — UUID v4 gives you cryptographically unique identifiers rather than potentially colliding integers.
Criply's random number generator has four modes accessible from tabs at the top:
Everything runs in your browser using crypto.getRandomValues(). No signup, no data sent to any server, no usage limit.
7 practical ways to work with PDFs faster. Free, instant download.
Use our free Random Number Generator tool — works in your browser, nothing to install.
Random Number Generator — Free