UtilityToolsLab

© 2026 UtilityToolsLab. Built and maintained by the UtilityToolsLab Team.

About·Changelog·Privacy Policy·Terms of Service·Contact
HomeNumber & Base ToolsRandom Numbers

Related Tools

Matrix CalculatorDice RollerFibonacci GeneratorFactorial CalculatorPrime Checker

Random Number Generator (RNG Generator)

Free random number generator (RNG) for whole numbers in any range, drawn from your device's cryptographic source, with unique mode and no modulo bias.

You Might Also Like

All Number & Base Tools

Matrix Calculator

Add, subtract, multiply, transpose, and find the determinant or inverse of a 2x2 or 3x3 matrix. No data ever leaves your device.

Dice Roller

Roll d4 through d100 with standard dice notation like 2d6+3, a running history, and cryptographically random results. No physical dice required.

Fibonacci Generator

Generate the Fibonacci sequence up to F(200) with exact BigInt precision. Shows golden-ratio convergence, a visual bar chart, and copy as CSV or lines.

Factorial Calculator

Compute n! for any n from 0 to 500 using exact BigInt arithmetic. Shows digit count, trailing zeros, Stirling approximation, and a P(n,r)/C(n,r) helper.

Most number pickers online call Math.random(), a fast pseudo-random function that the language specification itself declines to promise anything about, and which browsers document as unsuitable for anything security-adjacent. This random number generator (RNG) draws from crypto.getRandomValues instead, the same source your password manager uses. Picking who brings the coffee, the difference never shows. Picking something another person has a reason to predict, it is the whole game.

A second problem is quieter and much more widespread. Taking a 32-bit random value and reducing it with % 100 is the obvious way to land inside a range, and it is slightly wrong: 4,294,967,296 does not divide evenly by 100, so the 96 leftover values at the top of the space wrap round onto the lowest outputs and make them fractionally more likely than the rest. This tool discards that tail and draws again.

Set a minimum, a maximum and how many you want. Five labelled quick ranges cover what people usually arrive for: a die, a coin, a percentage, a six-of-49 lottery line, PIN digits. No draw is sent anywhere or recorded anywhere.

The Controls, and What Unique Values Costs

  • Minimum and Maximum are both inclusive. The tool opens on 1 to 100, which is 100 possible results rather than 99, and both fields accept negative whole numbers.
  • How many runs from 1 to 1,000. A single number renders large on its own; two or more render as chips with a Lowest, Highest, Sum and Mean row underneath.
  • Unique values removes repeats. Ask for more than the range can supply and the draw is refused with “You asked for 60 unique numbers from a range that only holds 49. Widen the range or switch off Unique values.”
  • Sort ascending is a display toggle rather than a redraw. Tick it after generating and the same numbers reorder in place, which means you can look at a draw both ways round without losing it. The statistics row does not move, because the underlying draw has not changed.

The Method Behind an Unbiased Draw

Each number starts as one 32-bit value from crypto.getRandomValues. Before it is reduced into your range, it is checked against a cut-off: the largest exact multiple of the range size that fits inside 4,294,967,296. Anything at or above that line is thrown away and a fresh value drawn. For the die preset the discarded tail is 4 values wide, so a second attempt happens roughly once in a billion draws, and the outcome is exactly uniform rather than nearly so.

Unique mode changes strategy with density. Six numbers out of 49 are drawn by rejection, keeping a set of what has come up already, and that converges in a handful of tries. A thousand unique numbers out of a range of exactly a thousand cannot work that way: it is the coupon collector problem, where the final few values take thousands of attempts each. Past one eighth density the range is built as an array and put through a partial Fisher–Yates shuffle, which finishes in a single pass with no retry loop at all.

When You Need Something Else: Raffles, Keys and Simulations

Raffles, team allocation, sampling rows out of a spreadsheet, dice replacement, picking a winner on a livestream: all fine, and the crypto source means nobody can argue the result was steered. Two cases are not fine. If you want key material, use a tool built for it rather than pasting integers together, because a key needs a defined length and encoding as much as it needs entropy. And if you are running a simulation you will need to reproduce, this is the wrong instrument entirely: there is no seed field, results are unrepeatable by design, and nothing about a draw survives you closing the tab. Regulated gaming draws have their own certification requirements that no browser tool meets.

Accuracy: True Random vs Pseudo-Random Numbers

There are two ways to generate random numbers. A true random number generator (TRNG) measures physical phenomena, such as atmospheric noise or thermal noise in a circuit, and turns them into bits. A pseudo random number generator (PRNG) is a short computer program. It takes a starting value called a seed and stretches it into a long random sequence. The same seed always gives the same sequence of numbers.

This RNG generator sits between the two. Your operating system collects physical entropy from hardware timing and device noise, then feeds it into a cryptographically secure PRNG. That is whatcrypto.getRandomValues reads from. No one can predict the next value from the ones before it, which is the property a plainMath.random() lacks.

The output is always a set of numbers that are integers, not decimals. If you need a random decimal, draw a whole number from a wide range and divide it. For example, draw from 0 to 9,999 and divide by 100 to get a value from 0.00 to 99.99 with two decimal places.

Quick ranges

Set a range and press Generate. Every draw comes from your device’s cryptographic random source, not from Math.random().

Numbers come from crypto.getRandomValues, and the tail of the 32-bit range that would skew a plain modulo is discarded and redrawn rather than folded back in. Nothing is generated on a server, so no draw is logged anywhere and none of them can be reproduced after you leave the page — which is the point for a raffle, and a problem if you needed an audit trail.