Random Number Generator

Pick random numbers in any range using the browser cryptographic random source. Integers or decimals, with or without repeats, up to 1000 at a time.

Presets

    Numbers come from crypto.getRandomValues(), the same source browsers use for cryptographic keys, drawn with rejection sampling so no value in the range is favoured. Nothing is sent anywhere — the draw happens on your device. Not a substitute for a certified randomness source in regulated gambling or lotteries.

    How to use

    1. Set a minimum and maximum, or click a preset such as dice or lottery.
    2. Choose how many numbers you want and whether repeats are allowed.
    3. Hit Generate, then copy a single result or the whole list.

    Frequently asked questions

    Is this random number generator actually random?

    It uses crypto.getRandomValues, the browser cryptographic random source, instead of Math.random. Values are drawn with rejection sampling so every number in the range is equally likely.

    Why not just use Math.random with a modulo?

    Modulo folds a power-of-two range onto an arbitrary one, which leaves the low end slightly more likely than the high end. Rejection sampling throws away the leftover draws instead, so the bias disappears.

    How do I generate numbers with no repeats?

    Untick "allow duplicates". The generator then draws without replacement. Ask for more numbers than the range holds, say 10 unique values between 1 and 5, and it tells you instead of hanging.

    Can I generate random decimals instead of whole numbers?

    Yes. Switch the mode to decimal and set how many places you want, up to 10. Each value is drawn uniformly across the range at that precision.

    Last updated

    Powered by maratool