Random Number Generator
Generate random integers in any range using your browser's cryptographic RNG, one at a time or in a batch, with or without repeats. No server involved.
Cryptographic RNG, and why it differs
The generator reads from crypto.getRandomValues, the same source your browser uses for session tokens, rather than from Math.random(). The difference is not cosmetic: Math.random() is a fast seeded generator whose output is predictable if you can observe enough of it, while the cryptographic source is designed so that past outputs do not help predict future ones. For drawing raffles, picking winners or sampling where the outcome matters, that is the property you want.
Values are drawn with rejection sampling rather than by taking a plain modulo. A naive random % range biases toward lower numbers whenever the range does not divide evenly into the generator's span, and the bias is invisible in casual testing but real in aggregate. Rejection sampling discards the inputs that would skew the result, so every value in range is equally likely.
Usage example
You need six unique order IDs to sample from this week's batch. Leave repeats off, set the range to your actual ID span, and the generator returns six distinct values - with repeats off it refuses a count larger than the range instead of looping forever or quietly duplicating. The batch box gives you one value per line for pasting straight into a spreadsheet column.
When the number has to be verifiable by other people after the fact - a giveaway, a randomised split - publish the range and count alongside the result, and use the UUID generator for identifiers instead, since those are meant to be unique rather than uniformly distributed. If the value feeds a shuffle or a sample of lines, pull them out first with the duplicate line remover so the range matches the list you actually have.
Frequently asked questions
Are the numbers the same across devices?
No, and they should not be. Each draw comes from your device's entropy pool, so two browsers produce different sequences. Reproducible random output would require a seed, which would defeat the point of using a cryptographic source.
What happens if I ask for more numbers than the range holds?
With repeats off and a count larger than the range, generation stops with a state message instead of producing duplicates or hanging. Set repeats on to allow the same value to be drawn more than once.
Is this suitable for cryptography?
The source is cryptographic, but this tool is for picking numbers - keys and tokens need length, format and handling rules this page does not provide. Use the password or UUID generators for those, and never derive a key from a number you picked here.
Related tools
UUID Generator
Generate RFC 4122 UUIDs in v4 and v7 flavours, with bulk output and copy-to-clipboard.
Strong Password Generator
Generate strong random passwords using the browser's cryptographic random source. Choose length and character sets; nothing leaves your device.
Lorem Ipsum Placeholder Generator
Generate lorem ipsum placeholder text by paragraph, sentence, word or list count, with an option to start with the classic opening.