ToolsYard

Random Number Generator

Generate a random number in a custom range, or roll virtual dice.

What this tool does

This tool generates random numbers using the browser's cryptographically secure random number generator — the same class of randomness used for encryption keys, not a predictable pseudo-random function. In Number Range mode, pick a minimum, maximum, and how many numbers to draw, with an option to avoid repeats. In Dice Roller mode, pick how many dice and how many sides each has, from a four-sided die up to a twenty-sided die.

Example use case

Picking a random winner from a numbered raffle, generating a random sample for statistics or testing, simulating dice rolls for a tabletop game without physical dice, or just settling an argument with an unbiased number.

Note on randomness

Results use crypto.getRandomValues with rejection sampling to avoid modulo bias, so every number in the range has an equal chance of appearing — unlike naive Math.random() approaches, which can slightly favor some values depending on the range.