Random integers in any range, plus a dice roller.
A random number generator (RNG) produces numbers that cannot be predicted in advance. It is the digital equivalent of drawing a number from a hat, rolling dice or flipping a coin. People use it for everything from classroom activities and party games to prize draws, board games and quick decision-making. Our generator runs entirely in your browser — no server calls, no waiting, no logs.
We use your browser's built-in Math.random() function, which returns a floating-point number between 0 (inclusive) and 1 (exclusive). To turn that into a random integer in a custom range [min, max], the formula is:
The ⌊ ⌋ symbol means "round down to the nearest integer". When you ask for multiple numbers, the process repeats independently each time. Each number has an equal probability of landing anywhere in the range you set.
The built-in dice roller simulates a standard 6-sided die (D6). Each face (⚀⚁⚂⚃⚄⚅) appears with equal probability, exactly like a physical die. It is perfect for board games when you do not have dice handy, or for online play with friends.
For different die types (D4, D8, D10, D12, D20), simply use the random number generator above and set the range accordingly — for a D20, set min=1 and max=20.
No. Math.random() is a pseudo-random generator — it is fast and well-distributed for everyday use, but its output is technically predictable to a determined attacker. It is completely fine for games, draws, teaching and casual decisions. For cryptographic purposes (secure keys, passwords, tokens), use window.crypto.getRandomValues() or a dedicated library instead.
We use your browser's built-in Math.random(), which is fine for games, draws and everyday decisions — but not for cryptographic or security purposes.
Yes. Set "How many" to the number of random values you want. Each is generated independently, so duplicates are possible, just like drawing with replacement.
Use the random number generator with min=1 and max=20. That gives a uniform random integer from 1 to 20, equivalent to a D20.
No. Math.random() is a pseudo-random generator, not cryptographically secure. Use window.crypto.getRandomValues() for anything security-sensitive.
No computer-generated number is truly random. Math.random() is pseudo-random: it uses an algorithm seeded by the system clock, producing a sequence that is unpredictable enough for everyday use.