Random Number Generator

Generate random integers or floats in any range. Bulk output, allow-repeats toggle, seeded mode for reproducible runs.

Min
Max
Count
Press Generate

Set a range and hit Generate.

01 — Overview

How the Random Number Generator works

A focused random number generator with the controls you actually need: range, count, integer vs float, decimal places, allow-repeats. Optional seed for reproducible output across runs — useful for fixtures and tests. Cryptographically random by default.

02 — Use cases

When to use the Random Number Generator

  1. 01

    Generate a list of unique IDs for a small test dataset

  2. 02

    Draw lottery or raffle picks (with a seed if you want auditability)

  3. 03

    Get a single random number in a range without firing up a REPL

  4. 04

    Sample N values from a distribution for quick experimentation

03 — Examples

Random Number Generator examples

100 × integers, 1-1000, no repeats

ex 01

742, 18, 903, 256, 411, ...

Unique integers drawn from a 1000-wide range.

1 × float, 0-1, 6 decimals

ex 02

0.418273

A single float, useful for quick sampling.

6 × integers, 1-49, no repeats

ex 03

7, 19, 23, 31, 42, 45

Drawn without replacement, so no number appears twice.

seed "launch-2026", 5 × integers, 1-100

ex 04

63, 12, 88, 41, 27

The same seed returns this exact sequence every time, on any machine.

04 — FAQ

Random Number — frequently asked questions

Is this cryptographically random?

By default, yes — it uses window.crypto.getRandomValues. If you provide a seed, it switches to a deterministic PRNG (mulberry32) so the output is reproducible. Seeded mode is not suitable for security use.

Why does 'no repeats' have an upper limit?

You can't draw more unique values than the range contains. The tool caps the count when no-repeats is on and the range is too small, and shows a hint when it does.

What does the seed actually do?

It switches the generator from the browser's cryptographic source to a deterministic algorithm, so the same seed always produces the same sequence. That makes fixtures reproducible and test failures debuggable. The trade-off is that seeded output is predictable by design — never use it for anything security-sensitive.

What is modulo bias and does this avoid it?

Taking a random byte modulo 10 gives 0–5 slightly more often than 6–9, because 256 doesn't divide evenly by 10. Over a large draw the skew is measurable. The generator uses rejection sampling — discarding values that fall in the uneven tail — so every value in your range is equally likely.

Can I use this for a giveaway or prize draw?

Yes, and using a seed is worth considering: publish the seed beforehand, draw afterwards, and anyone can reproduce the result and confirm you didn't re-roll. A visible seed turns a trust-me draw into a verifiable one.

Why not just use Math.random()?

It isn't cryptographically secure, its quality varies between engines, and you can't seed it — so it's simultaneously unsuitable for security and unsuitable for reproducible fixtures. This tool gives you a proper source for the first case and a seeded generator for the second.

05 — Reference

Specs and further reading

The primary sources this tool follows. Where behaviour is defined by a specification, we link the specification rather than a summary of it.

  • Crypto.getRandomValues()

    MDN Web Docs — The cryptographically secure generator used in secure mode.

  • Math.random()

    MDN Web Docs — Why the standard PRNG must not be used for anything security-sensitive.

  • SP 800-90A Rev. 1

    NIST — Recommendation for random number generation using deterministic bit generators.

07 — More

Tools that pair with Random Number

Last updated .