Random Number Generator
Generate cryptographically secure random integers, decimals, Gaussian values, dice rolls, and lottery picks — all in your browser.
Updated
Random Number Generator
Generate cryptographically secure random integers, decimals, Gaussian-distributed values, dice rolls, and lottery picks — all in your browser.
Integer Settings
Cryptographically Secure & Private
All numbers are generated locally in your browser using crypto.getRandomValues(). Nothing is ever sent to a server.
Frequently Asked Questions
What is the Random Number Generator?
The Random Number Generator is a free online tool that generate cryptographically secure random integers, decimals, gaussian values, dice rolls, and lottery picks — all in your browser.. It runs entirely in your browser with no installation or sign-up needed.
Are the numbers truly random?
They are cryptographically secure pseudo-random via Web Crypto (crypto.getRandomValues) — the same primitive used for key material, suitable for games, simulations, and most security-sensitive uses.
How does unique-integer mode avoid duplicates?
Small ranges use a partial Fisher-Yates shuffle; larger ranges use a Set-backed rejection loop. The tool validates max-min+1 >= count before generating.
How are Gaussian values generated?
Box-Muller transform: z = sqrt(-2*ln(u)) * cos(2*pi*v), then scaled by your mean and standard deviation.
Is the Random Number Generator free to use?
Yes, the Random Number Generator is 100% free with no registration, no hidden fees, and no usage limits. All processing happens locally in your browser, ensuring complete privacy.
Is my data safe with this tool?
Absolutely. The Random Number Generator processes everything client-side in your browser. No data is uploaded to or stored on any server. Your content remains private on your device at all times.
Does the Random Number Generator work on mobile devices?
Yes, the Random Number Generator is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.
Do I need to create an account to use this tool?
No account or registration is needed. Simply open the Random Number Generator in your browser and start using it immediately. There are no sign-up walls or usage restrictions.
How do I use the Random Number Generator?
Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.
Which browsers are supported?
The Random Number Generator works in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. For the best experience, use the latest version of your preferred browser.
What is modulo bias and how does this generator avoid it?
Modulo bias happens when you map a random source onto a range that doesn't divide evenly into it. If you take a 32-bit random value and use the remainder (modulo) to fit a range, the lowest numbers in that range can come up slightly more often, because they have one extra way to be produced. Over many draws this skews your distribution and quietly breaks fairness. This generator avoids it with rejection sampling: it discards any draw that would fall into the uneven leftover region and retries, so every integer between your minimum and maximum is equally likely. That matters for prize draws, blind experiment assignment, and shuffling, where a tiny bias is unacceptable. Set your range and count in the Integer tab and press Generate for unbiased results.
What's the difference between cryptographically secure random and truly random numbers?
Truly random numbers come from a physical, non-deterministic source such as atmospheric noise, radioactive decay, or thermal jitter — genuine entropy from the real world. Cryptographically secure pseudo-random numbers (CSPRNG), which this tool produces via the Web Crypto API, are generated by an algorithm seeded from the operating system's entropy pool. They are deterministic in principle, but seeded and designed so the output cannot be predicted or reproduced without the internal state, which is computationally infeasible to recover. For games, simulations, sampling, raffles, and most security tasks, a CSPRNG is indistinguishable from true randomness and far faster and more available. Only specialized cryptographic hardware or scientific work typically needs a true hardware source. For everyday fair, unguessable draws, open any tab and generate — the numbers are secure by default.
How do I roll dice using NdX notation like 2d6 or 4d20?
NdX notation is a compact way to describe a dice roll: N is how many dice you roll and X is how many sides each die has. So 2d6 means roll two six-sided dice, 4d20 means roll four twenty-sided dice, and 1d100 means roll a single hundred-sided die. It is the standard shorthand in tabletop games like Dungeons and Dragons and board game rulebooks. In the Dice tab you set the number of dice (up to 1,000) and the sides per die (from 2 to 10,000), then generate to see each die's result. Every die is rolled independently with the same cryptographically secure source, so the outcomes are fair and unbiased — no weighted or loaded dice. Pick the Dice / Lottery tab, enter your dice count and sides, and roll.
How does a Gaussian (normal) distribution differ from a uniform random range?
A uniform distribution makes every value in your range equally likely — drawing a number from 1 to 100 gives each number the same chance, like rolling a fair die. A Gaussian, or normal, distribution instead clusters most values near a central mean and produces extremes only rarely, forming the familiar bell curve. You control it with two settings: the mean (μ), which is the center, and the standard deviation (σ), which is the spread. Roughly 68% of generated values land within one σ of the mean and about 95% within two σ. This is the right choice when you are modeling real-world measurements like heights, test scores, or measurement error, which naturally bunch around an average. Use the Decimal tab for uniform numbers, or the Gaussian tab to set your mean and standard deviation and sample a realistic bell curve.
Can I pick fair lottery numbers, and how does the lottery mode work?
Yes. The Dice / Lottery tab includes a lottery mode that picks N unique numbers from 1 to M, exactly like a real draw where the same ball cannot come up twice. You set how many numbers to pick and the maximum value — for a 6-from-49 game you would pick 6 from a range of 49 — and the results are returned sorted in ascending order for easy reading. Because every selection draws from the Web Crypto secure random source and rejection sampling keeps the odds even, no number is favored and the picks cannot be guessed or reproduced. The tool also checks that your request is possible, so it won't try to draw more unique numbers than the range allows. It is genuinely random rather than a lucky guess, which makes it ideal for personal quick picks. Open the Dice / Lottery tab, choose lottery mode, and generate your numbers.
Embed This Tool
Add a free, live version of this widget to your own website or blog post — it runs entirely in your visitors' browsers, with a credit link back to The Toolbox.
<iframe src="https://getthetoolbox.com/embed/random-number" title="Random Number Generator — The Toolbox" width="100%" height="220" style="max-width:480px;border:1px solid #e2e8f0;border-radius:12px" loading="lazy"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://getthetoolbox.com/utility-tools/random-number?utm_source=embed&utm_medium=widget" target="_blank" rel="noopener">Free Random Number Generator</a> by The Toolbox</p>Related Tools
Free Secure Password Generator
Generate secure, random passwords with customizable options. Free, fast, and works entirely in your browser with no sign-up required.
Free UUID/GUID Generator
Generate universally unique identifiers (UUIDs/GUIDs). Free, fast, and works entirely in your browser with no sign-up required.
Free QR Code Generator Online
Create QR codes for URLs, text, WiFi, and contacts. Customize colors, size, and error correction. Free, private — runs in your browser, no sign-up.
Free JSON Formatter & Validator
Format, validate, and beautify JSON data with syntax highlighting and error detection. Free, fast, and works entirely in your browser with no sign-up required.
About the Random Number Generator
The Random Number Generator produces random values on demand — whole numbers, decimals, normally distributed samples, dice rolls, and lottery picks — without any setup. It runs entirely in your browser and draws its randomness from the Web Crypto API (crypto.getRandomValues()), the same source browsers use for cryptographic key material. That makes the output cryptographically secure, suitable for games, simulations, sampling, raffles, and most security-sensitive tasks. Nothing you generate is sent to a server; there is no sign-up and no usage limit.
It is built for anyone who needs a number they can trust to be unbiased: developers seeding test data, teachers picking a student at random, researchers drawing a sample, tabletop gamers rolling dice, and anyone running a fair giveaway.
Four generation modes
The tool is organized into four tabs, each tuned to a different kind of randomness:
- Integer — whole numbers between a minimum and maximum (both inclusive). Choose how many to draw (up to 10,000), whether to allow duplicates, and how to sort the output. With duplicates off, every value is unique.
- Decimal — floating-point numbers in a range, with 0 to 10 decimal places of precision and up to 10,000 values per batch. Each draw uses 53 bits of entropy, the full precision of a JavaScript double.
- Gaussian — values following a normal (bell-curve) distribution. Set the mean (μ) and standard deviation (σ); roughly 68% of results fall within one σ of the mean and about 95% within two σ.
- Dice / Lottery — roll any combination in standard NdX notation (e.g. 2d6, 4d20, 1d100) with up to 1,000 dice of 2 to 10,000 sides each, or pick N unique numbers from 1 to M for lottery-style draws, returned sorted ascending.
How the randomness stays fair
A common pitfall in naive generators is modulo bias, where some numbers come up slightly more often because the range doesn't divide evenly into the random source. This generator avoids that with rejection sampling: it discards draws that would skew the distribution and retries, so every integer in your range is equally likely.
Uniqueness is handled the same careful way. For "no duplicates," a partial Fisher-Yates shuffle produces unique integers across the range, switching to a set-backed rejection loop for very large ranges. Gaussian values come from the Box-Muller transform, which converts two uniform random numbers into a normally distributed one. Before generating, the tool checks that your settings are possible — for example, you can't draw 50 unique numbers from a range of 30, and it will tell you so instead of looping forever.
Working with your results
Every batch is summarized with live statistics — count, minimum, maximum, mean, and sum — so you can sanity-check a distribution at a glance. From there you can:
- Regenerate instantly with the same settings for a fresh draw.
- Copy the full list to your clipboard, one value per line.
- Download a CSV with an index column and value column, ready for spreadsheets or scripts.
- Clear and start over.
Why a dedicated generator matters
Reaching for the first number that pops into your head is not random — people unconsciously favor certain digits, avoid repeats, and cluster around the middle of a range. True fairness needs a proper source of entropy. Because this Random Number Generator uses the browser's cryptographic RNG rather than a predictable pseudo-random formula, results can't be guessed or reproduced from a seed, which is what you want for prize draws, blind assignment in experiments, shuffling test data, or simply settling a decision fairly. And since every calculation happens on your device, even a confidential drawing stays entirely private.
Pick a tab, set your range and count, and press Generate to see your numbers and their statistics appear at once.