CheckRandom

All tools

Random number generator

Fair random numbers in any range, or a random pick from a list

Set the range and press Generate. Every whole number in the range has the same chance.

Random numbers

Press Generate.

How these were made

    Pick from your own list

    Press Pick.

    Recent results

    Nothing yet. Results from this visit show here; they are not saved.

    How the numbers are made

    Numbers come from your browser's cryptographic random source, crypto.getRandomValues, the same source browsers use to make encryption keys. Nothing is sent to a server, and the page cannot be steered towards any number.

    The page takes 32 random bits for a range of up to about 4.3 billion numbers, and 53 bits for a wider one. To turn those bits into a number in your range without favoring any of them, it uses rejection sampling: a draw that lands in the small leftover slice above the last whole multiple of the range's size is thrown away and drawn again. Simply taking the remainder would make the lowest numbers in some ranges slightly more likely; this method does not.

    No repeats and sorting

    With "No repeats" ticked, every set of different numbers is equally likely, and you cannot ask for more numbers than the range holds: 1 to 10 has only 10. "Sort the results" lists them from lowest to highest; leave it off to see the order they were drawn.

    Picking from a list

    Each line of the list is one item, numbered from 1, and blank lines are ignored. With "Each item at most once", the list is shuffled by the Fisher-Yates method and the first items are taken.

    Quick ranges and a shared range

    The buttons such as "1 to 10" set the range and draw one number at once. A link ending in ?min=1&max=6 opens with that range filled in.

    What it is not for

    It suits games, classroom questions, choosing who goes first and sampling rows from a spreadsheet. It is not certified, and it is not for prize draws or anything with legal or money consequences.

    Related tools