LogMeOnce
DownloadAbout
Free Security Tool · No Registration

Secure Random Number Generator

Generate random integers with browser cryptographic randomness. Set practical range and count limits before requesting distinct results.

Use the Secure Random Number Generator

Generate unbiased random integers within a supported range using browser cryptography.

Interactive tool controls

← View All Free Tools

What Is a Secure Random Number Generator?

A secure random number generator uses the browser’s cryptographic source, so every number in the range is equally likely and unpredictable.

How to Use This Tool

  1. Enter supported integer minimum and maximum values.
  2. Choose how many results you need.
  3. Allow or disallow duplicates.
  4. Generate and copy the selected results.

How It Works

Cryptographic random bytes feed rejection sampling so mapping into the inclusive range does not introduce modulo bias. For distinct results, the requested count cannot exceed maximum − minimum + 1. Inputs and arithmetic must remain within the implementation’s exact integer bounds, with explicit resource limits.

Benefits and Use Cases

  • Avoid predictable general-purpose random sources.
  • Generate within an inclusive custom range.
  • Prevent impossible distinct-result requests.

Security Best Practices

  • Use supported integer bounds only.
  • Do not assume random samples must look evenly spaced.
  • Use dedicated credential generators for password-format requirements.

How Do I Read the Results?

Each result is independent unless you choose unique values.

Assumptions and Limitations

Not suitable for regulated lotteries or gambling that require certified hardware.

Related LogMeOnce Resources

Sources and Further Reading

Frequently Asked Questions

Are the endpoints included?

Yes; the minimum and maximum are both part of the requested inclusive range.

Why reject some random byte values?

Rejection sampling discards values that would otherwise make some results more likely than others.

Can random results repeat?

Yes; repetitions are normal when duplicates are allowed.

Can I request twenty distinct integers from one to ten?

No; that interval contains only ten distinct integers.

Is this based on Math.random?

Security-sensitive generation must use Web Crypto randomness rather than Math.random.

Published by LogMeOnce. Last updated November 27, 2026.

Keep your accounts easier to protect

Store generated credentials in your secure vault and simplify safer sign-ins with LogMeOnce.

Create a free LogMeOnce account