Advertisements

headerup to 320x100 / 728x90

Random Number Generator

Generate random numbers

Random Number Generator

Set a minimum and maximum range and generate one value.

Input
Focused controls for small conversions and calculations.
Results
Readable cards for unit-heavy output, with raw output kept for special cases.
Enter a value above or tap a sample to see structured results.
Advertisements

content bottomup to 300x250

What is Random Number Generator

Last reviewed:

Random Number Generator produces random integers or floating-point numbers inside a closed range [min, max] using either the browser's Web Crypto API (crypto.getRandomValues) for cryptographically strong output or Math.random for quick classroom-grade output.

The tool supports single values, batch generation (e.g., 100 numbers at once), uniqueness enforcement (no repeats — equivalent to a draw without replacement), and seeded deterministic mode for reproducible simulations.

Why use it

  • Pick a winner for a raffle, giveaway, or game show fairly and transparently.
  • Generate test data — 10,000 random integers for load-testing a numeric column or key.
  • Run a Monte Carlo simulation with reproducible output by supplying a seed.

Features

  • Cryptographically strong mode using Web Crypto API — suitable for raffles, lotteries, and security tokens
  • Fast mode using Math.random — 100× faster for non-critical use cases like game mechanics or placeholder data
  • Batch generation (up to 10,000 numbers) with optional uniqueness — draws without replacement
  • Integer or float output with configurable precision (decimal places)
  • Seeded deterministic mode for reproducible output — the same seed always yields the same sequence

How to use Random Number Generator

  1. Set the range. Enter the minimum and maximum values. The range is inclusive on both ends — [1, 10] can yield 1 or 10.
  2. Pick the mode. Choose 'Cryptographically strong' for anything fair (raffles, security) or 'Fast' for ad-hoc generation. The default is cryptographically strong.
  3. Set the count. For a single number, leave count at 1. For batch generation, enter up to 10,000. Enable 'no repeats' if you need draws without replacement.
  4. Seed (optional). If you need reproducible output, supply a seed string. The same seed always yields the same sequence — useful for simulations or shared demos.
  5. Generate and copy. Click Generate. The output appears instantly; click Copy or Download CSV to save it.

Example (before/after)

Input values

Choose the settings or values required to create random Number from the tool.

Generated result

Get generated random Number output that is ready to copy into your project or workflow.

Common errors

Unsupported input

The tool may reject input that does not match the expected content, structure, or file type.

Fix: Confirm the tool input requirements and paste the correct type of data.

Incomplete values

Missing fields or partial content can block processing or produce weak results.

Fix: Provide the full required input before running the tool.

Copying placeholder content

Sample or placeholder values can lead to output that looks valid but is not ready for real use.

Fix: Replace placeholders with your actual values before relying on the result.

FAQ

Is the random number generator cryptographically strong?

In crypto mode, yes — output comes from the browser's Web Crypto API (crypto.getRandomValues), which draws from the OS entropy pool. That's suitable for raffles, security tokens, and any context where bias or predictability would compromise fairness. The 'Fast' mode uses Math.random, which is NOT suitable for security-sensitive use.

How does the 'no repeats' option work?

Uniqueness enforcement runs a draw-without-replacement algorithm. The tool generates values one at a time, rejecting duplicates, and guarantees every number in the output appears exactly once. If the requested count exceeds the range size (e.g., 15 unique values from [1, 10]), the tool warns and caps the output at 10.

Can I reproduce the same output for a demo or test?

Yes — supply a seed in the optional seed field. The tool uses a deterministic xorshift PRNG seeded with your string. The same seed always produces the same sequence, regardless of which browser or device you run it on, which is essential for reproducible simulations and shared test fixtures.

What's the maximum range or count the tool supports?

The range supports any 64-bit integer (about ±9.2 × 10^18). The batch count is capped at 10,000 per request to keep the UI responsive; for larger volumes, use the CSV download and run multiple batches, or call the same algorithm from a script (the source is viewable).

Why does crypto mode produce slightly different output on each device?

Cryptographically strong random is by design non-reproducible — each call pulls fresh entropy from the OS, so two devices running the same inputs see different results. If you need reproducibility, switch to Fast mode with a seed; crypto mode deliberately cannot be seeded.

Is the tool safe for a real lottery or giveaway?

For informal giveaways and raffles, yes — crypto mode is bias-free and unpredictable. For regulated lotteries, gambling operations, or high-stakes draws, most jurisdictions require a certified RNG (NIST SP 800-22, eCOGRA, etc.) with third-party audit trails. This tool meets the entropy bar but does not provide certification.