Random Number Generator

Cryptographically secure random numbers

Browser-only processing

Related tools

More browser-based tools for this workflow.

View all

What this tool does

Generate cryptographically secure, unbiased random integers in any range using the Web Crypto API with rejection sampling. Pick min, max, and count.

Random Number Generator creates one or many integers in a range you choose. It is useful for drawings, test data, sampling, classroom examples, game tables, and any workflow where predictable Math.random output is not good enough.

Key features

  • Uses window.crypto.getRandomValues for cryptographically strong randomness in modern browsers
  • Rejection sampling avoids modulo bias, so every number in the selected range has the same chance
  • Supports single results or bulk lists for simulations, raffles, and QA test cases
  • Validates min, max, count, and range size before generating output
  • Copy-friendly comma-separated results for spreadsheets, scripts, and notes

Common use cases

  • Generating unbiased test values for forms, APIs, and validation logic
  • Picking sample rows, classroom exercises, or randomized practice problems
  • Running small simulations where predictable pseudo-random output would be misleading
  • Creating fair numeric draws when you need a quick local randomizer

Things to know

  • This tool generates integers only; decimals and weighted probabilities are not supported
  • The range must fit within a 32-bit unsigned window so rejection sampling stays fast and safe
  • Generated values are not saved, so copy them before closing or refreshing the page
  • For regulated lotteries or audits, use a process with published rules and independent verification
Privacy & local processing
Random numbers are produced by your browser's Web Crypto API in this tab. WebToolsLabs does not receive the range, count, or generated output.

How to use Random Number Generator

  1. 01

    Pick min, max, count.

  2. 02

    Generate.

  3. 03

    Copy results.

Frequently asked questions

How are the random numbers generated?
The tool uses the browser Web Crypto API and rejection sampling, which avoids the bias that can happen when random bytes are reduced with simple modulo math.
Can I generate decimal numbers?
Not in this version. It focuses on unbiased integers, which are the safest fit for ranges, drawings, test data, and simple simulations.
Why is there a range limit?
The generator keeps ranges within a 32-bit window so every value can be sampled fairly and quickly in the browser.
Is my data uploaded anywhere?
No. Every tool on WebToolsLabs runs entirely inside your browser. Your data never leaves your device.
Is this tool free?
Yes. All tools on WebToolsLabs are 100% free with no signup, no watermarks, and no usage limits.
Browse all Security & Privacy