Random Number Generator

Generate integers or decimals in a stated range using crypto.getRandomValues. Min and max are not swapped.

Last updated: October 4, 2026

Tool

This tool will load here.

What this generator does

A random number generator draws values from a range you name. This random number generator has two modes. Integer mode needs whole-number bounds and includes both ends: 1 to 6 can produce 1 and 6. Decimal mode uses a half-open range [min, max). The maximum itself is not returned. That matches a unit-interval sample times the width. If you needed the maximum as a possible decimal, raise the bound a little or use integers.

If minimum is greater than maximum, the page reports an error. It will not swap the fields. Silent swaps hide a typing mistake and then look like a fair draw. Empty fields and non-numeric text are errors, not zero. The source is crypto.getRandomValues with rejection sampling for integers so the distribution is not biased by a naive modulo.

Use this page for a raffle integer, a test fixture, or a decimal in a stated interval. It is not a statistical suite and not a lottery system. For a hex token, use the Random String Generator.

How to use

  1. Choose integer or decimal.
  2. Enter minimum, maximum, and how many values (1–100).
  3. Generate. Copy writes the list. Clear empties it.

Enter from a field runs generate. Each control has a visible label. Decimal mode with min equal to max is refused because the half-open width would be zero.

Example

Integer 1 to 6 is a fair die if the browser provides Web Crypto. All six faces can appear. Decimal 0 to 1 produces values in [0, 1). 0 can appear. 1 cannot. Ten values print one per line. A count of 0 or 101 is rejected. Script-looking text in a bound is rejected as not a number.

Limits

  • At most 100 values. Bounds whose size exceeds 1e15 are refused.
  • Integer ranges wider than 2^32 distinct values are refused so sampling stays fair.
  • Not a cryptographic key. Use the password or string generators for secrets.
  • Work stays in this browser.

If you needed a normal distribution or a seeded sequence you can replay, this page is the wrong tool. It draws fresh values each click. There is no seed field on purpose. A seed you type would be a different, documented generator.

Floating-point decimals are ordinary IEEE numbers. They are not decimal-exact money amounts. If the job was currency, generate integers of cents instead of a decimal dollar. Write the mode and the bounds next to the result so nobody later assumes the other rule.

Repeated clicks are independent. Seeing the same integer twice in a short list is allowed. Forcing uniqueness would be sampling without replacement, which this page does not do.

A classroom raffle that needs distinct ticket numbers should generate a longer list and skip repeats yourself, or pick from a hat. This page will not track which integers it already printed. A test suite that needs the same sequence tomorrow needs a seeded generator, which is a different contract. There is no seed here so nobody can reconstruct yesterday’s draws from a password on a sticky note.

Decimal output is printed with JavaScript’s ordinary number-to-string rules. You may see many digits after the point. That is the sample, not a rounded display of two decimal places. If the worksheet wanted two places, round after you copy, and say so next to the number.

On this page

Related Articles

Related guides

Related solutions

Need another tool ?

Open the free tools — no signup.

FAQs

newsletter signup

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Innovative Solutions For Modern Needs
Copyright © 2026 Yallasolve. all rights reserved.