Random Number Generator
Generate random numbers in any range, with an option for unique values only.
How Random Number Generator works
Pick numbers between a minimum and maximum using the browser's cryptographic random source. Everything happens inside this page: the tool reads your input, runs the calculation or conversion locally, and hands the result back to you. Nothing is transmitted, because there is no backend to transmit it to.
That design choice is deliberate. Most free tool sites upload your files to a server, process them there, and quietly keep a copy. Toolcin cannot do that — the site is a set of static files. If your connection dropped the moment the page finished loading, every tool would still work.
Where the numbers come from
Each value is drawn from the browser's cryptographic random source, not Math.random. The tool reads a 32-bit value, rejects the top slice that would make some results more likely than others, and takes the remainder — a technique called rejection sampling.
That rejection step is what makes the distribution actually flat. The naive “random × range” approach silently favours low numbers whenever the range does not divide evenly into the generator's maximum, and on a 1–100 draw the bias is small but real.
Decimals, ranges and the unique option
Both ends of the range are rounded inward: 1.2 becomes 1 and 99.9 becomes 99, so the endpoints you type are always achievable whole numbers. If the maximum ends up below the minimum, the tool says so instead of returning something arbitrary.
The unique option samples without replacement, which is what you want for a raffle or a seating plan. Asking for 50 unique numbers between 1 and 40 is refused rather than looping forever, because the request cannot be satisfied.
| Setting | Range | Typical use |
|---|---|---|
| Count | 1–1000 per click | Dice pools, test fixtures, sampling |
| Min / max | Any whole numbers | Lottery draws, ID numbers |
| Unique | On or off | Raffles, assignments without repeats |
Is this suitable for a lottery?
For a school raffle or a team draw, yes: the source is not predictable and the output is unbiased. For anything with money attached, the process matters as much as the number — publish the range and the time of the draw beforehand, and let someone else press the button.
Cryptographic randomness does not make a draw auditable. If you need proof, record the screen and the clock, or use a public randomness beacon.
Good to know
- Works offline once loaded, including on flights and in locked-down networks.
- No file size limit beyond your device's own memory.
- Free to use, with no account and no usage counter.
- Results are produced locally, so they are not logged or shared with anyone.
Questions
Is it truly random?
It uses crypto.getRandomValues, which is suitable for passwords and draws.
Can numbers repeat?
Only if you leave “No repeats” unticked.
Can I generate numbers with decimals?
Not in this version — the output is whole numbers only, with both range ends rounded inward.
Are the numbers reproducible?
No, and that is intentional. There is no seed field, so the same settings never produce the same sequence twice.
Keep going
More math tools
Dice Roller
Roll up to 100 dice of any standard type, add a modifier and see each face plus the total.
Open toolStandard Deviation
Paste a list of numbers to get mean, median, both standard deviations and variance.
Open toolFraction Calculator
Do fraction arithmetic and get the answer simplified to lowest terms with its decimal value.
Open toolAverage Calculator
Paste numbers to get the mean, median, mode, range and sum in one view, with the count and the working shown.
Open toolRatio Calculator
Simplify a ratio to its lowest terms and solve for the missing side at any scale.
Open toolBinary to Decimal
Convert binary numbers to decimal, hexadecimal and octal, with invalid digits flagged.
Open tool