A random number,
or a thousand.

Pick any range, choose how many you want, kill duplicates if you need to, switch on decimals when you don't. Every result has its own URL — share, bookmark, embed.

Bias-free across any range Up to 1,000 per draw Shareable URL
Result
More settings
places:

About this generator

Most random number generators online are roughly the same: type a min, type a max, get a number. The difference between a good one and a forgettable one is what happens at the edges — what if you want fifty numbers, not one? What if duplicates would ruin the use case? What if you need to send the configuration to a colleague?

This one was built around those edges. The single-number case is the same as everywhere else, but ask for more than one and you get a clean, copyable list, optionally sorted, optionally without duplicates. Toggle decimals and a precision picker appears. Every input you change writes to the URL with history.replaceState, so the page in your address bar always reflects the generator someone else would see if you sent them the link.

Underneath, every draw uses crypto.getRandomValues with rejection sampling, not Math.random. That matters less for casual use than purists pretend, but it matters when the range is large or weirdly sized: Math.random() * range | 0 introduces small biases at the boundaries because 2³² rarely divides cleanly into your range. Rejection sampling throws out out-of-range draws and re-rolls, which makes every integer in the range exactly equally probable.

What this is not: a certified RNG for sweepstakes, audits, or anything legally regulated. For those, use a notarized provider like random.org. For a classroom raffle, a unit test seed, or "pick a page in the textbook," this is faster, sharper, and shareable. If you need the numbers to come from a fixed pool of named entries instead of a numeric range, the wheel spinner is one click away.

What people use it for

Numbers are abstract until you put them next to a job. Here are the common ones.

Raffles & giveaways

Number your entrants 1 to N, generate one number with duplicates off, and you have a winner. Share the URL of the result so the draw is auditable after the fact.

Sampling

Need 30 random rows from a 5,000-row spreadsheet? Generate 30 numbers in [1, 5000], duplicates off, sorted ascending, and pull those rows.

Test data

Seed a dev database with realistic-looking IDs, ages, prices, or quantities. Decimals on, two places, range tuned to your domain.

Pick a page

Bibliomancy, study practice, or random-flip reading. Type 1 and the page count, hit generate, open the book.

Classroom games

Roll for question order, table groups, recess pick. Project the page, hit generate, no one accuses the teacher of bias.

Statistics demos

Show students what a uniform distribution actually looks like by generating 500 numbers in [1, 6] and counting the ones, twos, threes.

How it works

Source of randomness

Every draw pulls fresh entropy from the browser's crypto.getRandomValues — the same source banks, password managers, and TLS handshakes use. We never call Math.random, which on most engines is a single seeded pseudo-random sequence and can repeat across page loads if the seed collides.

Rejection sampling

To convert a 32-bit unsigned int into "a number in [min, max]" without bias, we compute limit = floor(2³² / range) * range, draw a 32-bit value, and re-roll if it lands at or above the limit. The discarded slice is the only part that wouldn't divide evenly, so what's left is uniformly distributed across the range. The retry rate is at most ~50% in the worst case and effectively zero for most ranges.

No-duplicates mode

When you turn duplicates off, we do a partial Fisher-Yates shuffle: build the range as a virtual array, swap from the end count times, and slice. For a small count over a giant range, we use rejection-with-set instead of materializing the array. Either way, every output combination is equally likely.

State & sharing

All settings live in the URL query string (?min=1&max=100&count=1&dec=0) and update on change with history.replaceState. The last 10 results live in localStorage under number:history; nothing leaves the browser.

Drop this generator anywhere.

Stick it on a teaching page, a blog post, a class site, or a project tool. The settings travel through the URL.

Embed docs →
<iframe src="https://randomgen.net/number/embed/"
  width="100%" height="460"
  loading="lazy"></iframe>

Common questions

What range can I generate numbers in?

Any integer range up to roughly 9 quadrillion (Number.MAX_SAFE_INTEGER). Negative numbers, zero, and inverted ranges all work — if you put the higher number in the min field by mistake, we just swap them silently.

How is this more random than Math.random?

We use crypto.getRandomValues with rejection sampling. Math.random in most browsers is a 64-bit pseudo-random sequence seeded once per page; ours pulls fresh entropy from the OS for every draw and is bias-free across any range, no matter how oddly sized.

Practically, for a coin-flip or a 1-to-100 draw, you can't tell the difference. For a 1-to-7,919 draw repeated 10,000 times, you can.

Can I generate numbers without duplicates?

Yes. Toggle off Allow duplicates and we draw without replacement using a Fisher-Yates-style pool. The count you ask for cannot exceed the size of the range when duplicates are off — if it does, we cap it and tell you.

Does it support decimals?

Yes. Toggle on Decimals and pick a precision from 1 to 10 places. Decimals are sampled uniformly across the full range, then rounded — the rounding is unbiased.

How do I share a specific configuration?

The URL bar holds your full setup: min, max, count, duplicates, sorting, decimals. Copy and paste it anywhere — anyone who opens it sees your exact preset, ready to draw. The Share URL button copies the current URL to your clipboard.

Is there a maximum count of numbers per draw?

The UI caps at 1,000 numbers per draw to keep the page fast and readable. If you need more, contact us or use the API endpoint at /api/number/.

Can I use this for a giveaway or raffle?

For casual raffles, yes — set min, max, count, and turn off duplicates. For legally regulated draws (sweepstakes, lotteries, audits), use a notarized provider like random.org. Browser crypto is statistically sound but not legally certified.