About this tool
Generate unbiased random numbers in any range, integers or decimals, with no-duplicate draws, exclusions, odd/even and prime filters, history and CSV export.
This random number generator draws numbers from any range between −1,000,000,000,000,000 and 1,000,000,000,000,000, as whole numbers or decimals with up to 10 places. Each draw uses your browser's cryptographic random source (crypto.getRandomValues) with rejection sampling: it reads just enough random bits for the range and throws away any value that falls outside it, so no number is favoured the way a simple modulo shortcut would favour some. You can ask for many numbers at once, forbid duplicates, sort them, skip an exclude list, or keep only odd, even or prime values. Everything runs on your device; nothing is sent to a server.
Open Random Number Generator on AltFTool — it loads instantly in your browser.
Pick a Quick preset such as 1 – 100, Dice (1–6) or Lottery 6 of 49, or type your own Min and Max — negative numbers and decimals are accepted.
Set How many numbers you want and the Decimal places (0 for integers), then choose Sort, Odd / even, No duplicates, Primes only or an Exclude numbers list.
Press Generate or the Space key: the numbers appear in the Result panel with Sum, Mean, Lowest and Highest when you draw more than one.
Use Copy, CSV or TXT to save the result; every draw is also kept in History with the range and options used.
Values come from crypto.getRandomValues and out-of-range draws are rejected and redrawn, so every number in the range has exactly the same chance.
Numbers are handled as exact big integers, so a range up to 10^15 or a 4-decimal draw between 0 and 1 is never rounded by floating-point maths.
Exclude list, odd or even only, and primes only are applied before the draw, and the tool tells you when too few numbers are left to draw without duplicates.
Your last 30 draws stay in this browser, and the current result copies with one key or downloads as CSV or TXT.
It uses crypto.getRandomValues, the browser's cryptographically secure random source, which is seeded from the operating system's entropy pool. That is the same source browsers use for encryption keys, so the numbers are unpredictable for any practical purpose. It is not a hardware dice roll, but it is far stronger than Math.random, which is designed for speed rather than unpredictability.
Modulo bias happens when a random byte from 0 to 255 is squeezed into a smaller range with the remainder operator: for a range of 100, values 0 to 55 come up slightly more often than the rest. This tool instead draws just enough random bits to cover the range and rejects any draw that falls outside it, then draws again. Every value ends up with exactly the same probability.
Tick No duplicates before you press Generate. For ranges up to 200,000 values the tool lists every allowed number and shuffles a sample from that list; for larger ranges it redraws whenever a number has already been picked. If you ask for more unique numbers than the range and filters allow, it tells you how many are actually available instead of looping forever.
Yes. Choose 1 to 10 in Decimal places and every value in the range at that step becomes equally likely — with 2 places, a range of 0 to 1 has 101 possible results from 0.00 to 1.00. The decimals are generated as exact scaled integers, so you never see floating-point artefacts such as 0.30000000000000004.
Press the Lottery 6 of 49 preset. It sets the range to 1–49, How many to 6, turns on No duplicates and sorts the result in ascending order. For other games change Max and How many: for example 5 numbers from 1 to 69, or add a second draw of 1 number from 1 to 26 for a bonus ball.
Yes. Type the numbers to skip in the Exclude numbers box, separated by commas or spaces, for example 7, 13, 42. Excluded values are removed before the draw rather than filtered afterwards, so the remaining numbers stay equally likely. The tool shows an error if an entry is not a number or if no allowed numbers remain.
With Decimal places set to 0, choose Odd only or Even only in the Odd / even menu, or tick Primes only. Primality is checked with a deterministic Miller–Rabin test that is exact for every number this tool can produce, so a prime draw from 1 to 10^15 is reliable. The filters are disabled for decimals because parity and primality only apply to integers.
Min and Max can be anywhere from −10^15 to 10^15, which is a quadrillion either side of zero, and you can draw up to 10,000 numbers at a time. All arithmetic is done with JavaScript BigInt, so even at the top of the range each integer is exact rather than rounded to the nearest representable floating-point value.
Number your entries from 1 upwards, set Min to 1 and Max to the number of entries, and press Generate; tick No duplicates if you need several winners. History records the draw with the time and options so you can show how it was made. For a public prize draw, do it on screen in front of participants.
Only in your own browser. Your settings and the last 30 draws are saved in localStorage so they are still there when you come back, and Clear in the History panel removes them. No number, setting or draw is sent to a server, and the generator keeps working offline once the page has loaded.
Add the Random Number Generator widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/random-number-generator"
title="Random Number Generator — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/random-number-generator?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>