Random Number Generator
Generate random numbers.
Loading tool…
Random, pseudorandom, and cryptographically secure
Computers are deterministic, so most "random" numbers are pseudorandom: produced by an algorithm from a seed value, statistically well distributed but entirely reproducible if you know the seed. JavaScript's Math.random works this way, which is fine for shuffling a list or picking a colour and unsuitable for anything where predictability would matter.
Cryptographically secure generation is different. The browser's crypto.getRandomValues draws from the operating system's entropy pool, which collects unpredictability from hardware sources, and its output cannot be predicted even by someone who has seen previous values. That is the right source for passwords, tokens, and prize draws. One more subtlety: mapping random bytes onto a range naively — with a simple modulo — makes some values slightly likelier than others, so a careful generator rejects and resamples to keep the distribution even.
Why we built this tool
Random numbers are needed for prize draws and giveaways, sampling rows from a dataset, assigning participants in a study, picking lottery numbers, and generating test data.
Where fairness or security matters, the source matters. A server-side generator also means the numbers you are about to rely on existed on someone else's machine first, in their request log. Ours generates in your browser, using the cryptographically secure source where it counts, so the values are produced on your device and never transmitted. No account, no limit on how many you draw, and it works offline — which is the sort of independence a fair draw ought to have.
Tips and common mistakes
- Turn off duplicates for draws and samples, or the same entry can win twice.
- Use a cryptographically secure source for anything where predictability would matter.
- Record the result immediately when the draw settles something.
- A truly random sequence often looks non-random — clusters and repeats are expected, not evidence of a fault.
Open Random Number Generator with a link
Random Number Generator can be handed its input by the link that opens it, so the page arrives with the work already done. This is meant for assistants and scripts: if a chatbot, an editor extension, or a command-line agent already holds your content, it can build a link instead of asking you to copy and paste into a box.
The payload rides in the fragment — the part of a URL after the #. Browsers never send the fragment to a server, so anything handed over this way stays on your device exactly as a dropped file would. A link that uses the query string instead is rewritten into the fragment by the page before any analytics or ad script can read the address.
#min=— lowest number#max=— highest number#count=— how many to produce#unique=— 1 for no repeats
Example: https://mygadgets.ink/tools/random-number-generator/#min=...&max=...&count=...&unique=...
Quick start: using Random Number Generator
- Set the minimum and maximum for your range.
- Choose how many numbers you need.
- Decide whether duplicates are allowed — turn them off for a draw or a sample.
- Generate, and record the result immediately if it settles anything.
- For a public draw, generate in front of witnesses or record the moment.
For identifiers rather than numbers, use UUID Generator; for placeholder content, Lorem Ipsum Generator.