Skip to content
UniKit

Random number generator

Generate cryptographically secure random integers (unique and sortable), decimals, strings and list picks, with a recent-history log kept in memory.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Uses crypto.getRandomValues with rejection sampling to avoid modulo bias
Result

Press generate to see the result

History

No results yet

What this tool does

  • Generate batches of random integers for draws, roll calls or room assignments — rejection sampling removes modulo bias instead of relying on a plain remainder.
  • Need a set of unique numbers such as seat or exam IDs? Enable "unique values", which is sampling without replacement and never repeats a number.
  • Roll random decimals, random strings or picks from a list in one place instead of hopping between tools.
  • For load tests and fixtures you often need throwaway tokens or order IDs; choose digits, mixed case, hex or your own character set.

Example

Input

Integer mode: min 1, max 100, count 5, unique values and ascending sort enabled

Output

Five distinct integers between 1 and 100, sorted ascending

The random source is the browser crypto.getRandomValues, so each run differs; with uniqueness enabled the count cannot exceed the number of available values (100 here).

Frequently asked questions

Is the output actually unbiased?

The entropy comes from the browser crypto.getRandomValues API, which is cryptographically strong. Values are drawn with rejection sampling: the high range that would cause modulo bias is discarded and redrawn, so every value has exactly the same probability.

Can a unique draw ask for more values than the range holds?

No. Asking for 20 distinct values from 1–10 fails immediately with a message that the count exceeds the available values. It is mathematically impossible, and the tool will not return duplicates to paper over it.

Are results saved anywhere?

Only the last few results live in page memory and vanish on refresh; nothing is written to localStorage. All computation is local and no network requests are made.

Why does a custom character set get deduplicated?

Because characters are drawn uniformly by position, a character listed twice would be twice as likely to appear. The custom set is therefore stripped of whitespace and duplicates so it cannot be silently weighted.

Are there limits on how much I can generate?

At most 10,000 values per run, decimal places between 0 and 10, and a value range of up to 2^32 integers. Exceeding any of these produces a specific error rather than a silent truncation.

Keywords:randomrandom numberrandom stringpassword generatorcryptodice随机数随机数生成器随机整数随机小数随机字符串去重抽签

Related tools