Random Number Generator
Generate random integers or decimals online. Set a custom range and quantity, avoid duplicates, sort results, and copy or export your numbers.
Random Number Generator
88, 51, 62, 33, 18, 74, 91, 1, 80, 89
| Interval Range | Count | Percentage |
|---|---|---|
| 1 to 19 | 2 | 20% |
| 19 to 37 | 1 | 10% |
| 37 to 55 | 1 | 10% |
| 55 to 73 | 1 | 10% |
| 73 to 91 | 5 | 50% |
1. Technical Overview & Architecture
The ToolMono Random Number Generator is a client-side randomization suite engineered for developers, educators, researchers, and event organizers who require statistically sound, unbiased random generation directly in their browser.
Generate uniform integers or floating-point decimals with customizable bounds, quantity, duplicate controls, sorting, and arithmetic filters.
Pick single or multiple random items from custom choice lists, raffles, coin flips (Heads/Tails), or Yes/No decisions without duplicates.
Powered by native crypto.getRandomValues rejection sampling, eliminating modulo bias without sending data over any network.
Operating 100% in client-side JavaScript memory, the engine requires zero server round-trips, works completely offline, and never persists or transmits generated numbers, seeds, or user parameters.
2. How to Use the Random Number Generator
Configuring the generator is straightforward and provides full control over numerical parameters:
Enter your Minimum Bound and Maximum Bound. Both endpoints are strictly inclusive. Set your desired Quantity (1 to 10,000).
Select Integers or Decimals, choose whether to Allow Duplicates or enable No Repeats, and select your random engine (Web Crypto CSPRNG, Standard, or Seeded).
Click Generate to draw fresh numbers. Inspect the live statistical summary and histogram, then click Copy or Export File (CSV, JSON, Markdown, or Plain Text).
3. Generate Random Numbers Between 1 and 100
One of the most frequent applications of an online random number generator is generating a random number between 1 and 100.
Step-by-Step Configuration for 1 to 100:
- Minimum Bound (Min): Set to
1. - Maximum Bound (Max): Set to
100. - Quantity (Count): Set to
1for a single random pick, or any number (such as10) for a list of draws. - Inclusive Endpoints: Both
1and100have an equal, uniform probability of exactly1 / 100 (1.00%). - Quick Preset: Click the 1–100 preset button above the generator card to apply these settings in a single click.
Whether selecting a raffle winner from 100 tickets, conducting a classroom demonstration, or simulating percentile dice (d100), the rejection sampling engine guarantees zero skew toward lower numbers.
4. Generate Numbers Without Repeats (Unique Sampling)
When conducting drawings, lotteries, or sampling experiments, duplicate numbers can invalidate the results. ToolMono provides an explicit No Repeats mode (sampling without replacement).
Instead of naively picking numbers in a loop and retrying when collisions occur (which slows down exponentially as the pool depletes), ToolMono uses an exact partial Fisher-Yates shuffle. This guarantees mathematical uniformity in O(K) time with zero retries.
If a user requests 20 unique numbers from a range containing only 10 integers (e.g., 1 to 10), it is mathematically impossible to fulfill. Rather than freezing or falling back to duplicates, ToolMono immediately displays a clear validation error.
5. Integer vs. Decimal Random Numbers & Precision
ToolMono supports both discrete integer generation and continuous floating-point decimal generation:
| Attribute | Integer Mode | Decimal Mode |
|---|---|---|
| Domain | Discrete whole numbers (..., -2, -1, 0, 1, 2, ...) | Continuous floats (e.g. 3.14159, -0.75) |
| Precision Control | Exact integers (0 decimal places) | Configurable from 0 up to 10 decimal places |
| Uniqueness Behavior | Strict integer uniqueness (count ≤ max - min + 1) | Guaranteed unique displayed string representations |
| Typical Use Cases | Dice rolls, lottery picks, raffle drawings, indexing | Scientific simulations, weights, probabilities, financial models |
In Decimal mode with duplicate prevention enabled, the generator evaluates uniqueness against the formatted decimal output. This ensures that rounding does not produce identical displayed numbers on your screen.
6. Randomness Engines, CSPRNG & Security Boundaries
Understanding the underlying entropy engine is critical for choosing the right mode for your application:
Accesses hardware-backed entropy from your operating system via crypto.getRandomValues. Rejection sampling eliminates modulo bias, ensuring non-predictable, cryptographically strong randomness.
Powered by the Mulberry32 algorithm. The same seed string or number produces the exact same sequence of random numbers across page refreshes, ideal for reproducible tests and procedural generation.
Standard browser V8 pseudo-random generator (xorshift128+). Lightweight and fast, but predictable if consecutive outputs are observed. Not cryptographically secure.
While ToolMono's Web Crypto CSPRNG engine provides cryptographically strong non-predictability, it executes client-side within your browser. It is intended for casual drawings, games, classroom exercises, software testing, and nonces. It is not an auditable hardware security module (HSM) and is not legally certified for state lotteries, commercial casino gaming, or regulated prize competitions. For dedicated password generation, visit our specialized Password Generator.
7. Numeric Filters, Divisors & Instant Presets
Fine-tune numerical sets with built-in arithmetic filters and convenient presets:
- All Numbers: Uniform sampling across the entire range.
- Even Only: Integers satisfying
n % 2 === 0(including negative evens and 0). - Odd Only: Integers satisfying
Math.abs(n) % 2 === 1. - Prime Numbers Only: Natural numbers
n ≥ 2with no positive divisors other than 1 and itself. - Multiples of N: Integers divisible by non-zero divisor
M(n % M === 0).
- 1–10: Single digit random number.
- 1–100 (Single): Standard percentile draw.
- 1–100 (10 No Repeats): 10 unique non-repeating numbers in [1, 100].
- Dice 1–6: Standard 6-sided gaming die roll.
- Coin Flip: Fair binary outcome (0 or 1 / Heads or Tails).
- Lottery 6/49: 6 unique random integers from 1 to 49.
- -100 to +100: Negative to positive cross-zero range.
8. Statistical Distribution & Histogram Analysis
Whenever numbers are generated, ToolMono computes a complete suite of descriptive statistics directly from the resulting sample array:
μ = ∑ x / NAverage of all generated values.
s = √(∑(x - μ)² / (N-1))Sample dispersion for N > 1.
min(x) & max(x)Smallest and largest drawn numbers.
evens vs oddsCount of even and odd values.
The built-in Histogram partitions the sample into 5 non-overlapping intervals, calculating the exact frequency count and relative percentage for each bin. This allows visual verification of uniform dispersion across the selected range.
9. Common Uses & Real-World Applications
Demonstrate the Law of Large Numbers, empirical distributions vs. theoretical distributions, and sampling with or without replacement.
Pick winners for giveaways, raffles, door prizes, and office contests without repeating winner numbers or names.
Simulate polyhedral dice (d4, d6, d8, d10, d12, d20, d100), coin flips, and custom randomization tables.
Generate random test vectors, IDs, array indices, synthetic load testing quantities, and reproducible seeded test fixtures.
10. Production Code Implementations (JS, Python, Go, Rust)
Integrate unbiased CSPRNG integer sampling into your backend services, CLI utilities, and frontend applications:
/**
* Unbiased bounded random integer in [min, max] inclusive
* Uses Web Crypto API rejection sampling to eliminate modulo bias.
*/
export function getSecureRandomInt(min: number, max: number): number {
if (min === max) return min;
const range = max - min + 1;
const maxUint32 = 0xffffffff;
const limit = maxUint32 - (maxUint32 % range);
const buffer = new Uint32Array(1);
let raw: number;
do {
crypto.getRandomValues(buffer);
raw = buffer[0];
} while (raw >= limit);
return min + (raw % range);
}import secrets
def get_secure_random_int(min_val: int, max_val: int) -> int:
"""
Returns an unbiased random integer in [min_val, max_val] inclusive
using the OS cryptographically strong entropy source.
"""
range_size = max_val - min_val + 1
return min_val + secrets.randbelow(range_size)package main
import (
"crypto/rand"
"fmt"
"math/big"
)
func SecureRandomInt(min, max int64) (int64, error) {
rangeSize := big.NewInt(max - min + 1)
n, err := rand.Int(rand.Reader, rangeSize)
if err != nil {
return 0, err
}
return min + n.Int64(), nil
}use rand::Rng;
pub fn get_secure_random_range(min: i32, max: i32) -> i32 {
let mut rng = rand::thread_rng();
rng.gen_range(min..=max) // Inclusive upper bound [min, max]
}using System.Security.Cryptography;
public static class SecureRng {
public static int GetRandomInt(int min, int max) {
// RandomNumberGenerator.GetInt32 is exclusive on upper bound: [min, max + 1)
return RandomNumberGenerator.GetInt32(min, max + 1);
}
}export function mulberry32(seed: number): () => number {
let s = (seed >>> 0) || 1;
return function () {
let t = (s += 0x6d2b79f5);
t = Math.imul(t ^ (t >>> 15), t | 1);
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
}11. Frequently Asked Questions
13. Official Technical Standards & Specifications
W3C Web Cryptography API (crypto.getRandomValues)
W3C recommendation for cryptographically secure pseudo-random number generation.
NIST SP 800-90A Rev. 1: Recommendation for Random Number Generation
NIST technical standard for CSPRNG entropy sources.
ECMAScript Language Specification: Math.random()
Official JavaScript specification for pseudo-random number generation.
Related Tools
Browse all toolsSecure Password Generator
Generate strong random passwords and memorable passphrases instantly in your browser. Customize length, characters, and options with browser-based cryptographic randomness.
Online UUID & GUID Generator
Generate secure UUID v4 and time-ordered UUID v7 identifiers online. Create single or bulk UUIDs with formatting controls, GUID support, and client-side Web Crypto generation.
Prime Checker
Enter a whole number to check whether it is prime or composite. Get a clear result, inspect the available factorization details, and understand how primality testing works.
GCD & LCM Calculator
Enter two or more integers to calculate their greatest common divisor (GCD) and least common multiple (LCM). View the results and, where supported, follow the calculation steps to understand how they are obtained.
Online Calculator
Free online calculator for quick everyday math, complex expressions, parentheses, percentages, and powers. Includes keyboard input and local calculation history.
Scientific Calculator
Use ToolMono's free Scientific Calculator for advanced mathematical calculations. Supports trigonometric, inverse, hyperbolic, logarithmic, exponential, factorial, scientific notation, degree/radian modes, calculation history, and 100% client-side processing.