RandomNr

Cryptographically Secure Random Number Generator

Draw numbers from the Web Crypto entropy source, with no bias from rounding or modulo.

Secure Random Number Generator

57

Number from 1 to 100

Range

Options

Sort results

How many numbers

How to use the secure random generator

  1. Set the range and how many numbers you need.
  2. Turn on no repeats for a unique set, and sort if you want it ordered.
  3. Generate, then copy or export.

What is a secure random number generator

A secure random number generator draws numbers from the Web Crypto entropy source in your browser, with no bias from rounding or modulo. Set your range and count, and Random Nr uses rejection sampling on cryptographic randomness so every value is equally likely, which is what security codes, tokens and serious draws should be built on.

Why Math.random is not enough

Everyday scripting randomness and cryptographic randomness are different tools. The common Math.random is fine for shuffling a playlist and wrong for anything security sensitive.

PropertyMath.randomWeb Crypto (this tool)
Unpredictableno, state can be recoveredyes
Seeded from hardware entropynoyes
Safe for keys and tokensnoyes
Free of modulo bias herenot handledhandled by rejection sampling

Math.random uses a fast pseudo random algorithm whose internal state can be reconstructed from a few outputs, which means future values can be predicted. This tool uses the Web Crypto source instead, the same one used to generate encryption keys.

What is modulo bias

A naive way to fit a random value into a range is to take it modulo the range size, but unless the range divides evenly into the source, some numbers come up slightly more often than others. Over a key or a token, that skew is a real weakness. This generator uses rejection sampling: it discards the rare values that would cause the skew and draws again, so every number in the range is exactly equally likely.

What a secure generator is used for

This tool produces the secure random numbers behind passwords, tokens and keys. It does not assemble a full password with letters and symbols, which needs its own length and character rules. For the same source framed around physical entropy, see the true random number generator.

More number generators

Frequently asked questions

What makes it secure

It draws from the Web Crypto entropy source, which is designed to be unpredictable enough for security keys, and it avoids modulo bias with rejection sampling.

What is modulo bias

When a range does not divide evenly into the random source, a simple remainder favours some numbers. Rejection sampling removes that bias.

Can I draw a unique set

Yes. Tick no repeats for distinct numbers, capped at the size of the range.

Is it suitable for passwords

It is suitable for the random numbers behind them. For full passwords, use a dedicated password tool that also handles characters and length rules.

Is it free

Yes, free and with no sign up.

Related generators

For the same source framed around entropy, see the true random number generator.