What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A random number generator (RNG) produces numbers or bits according to a chosen distribution. Use an ordinary pseudorandom generator (PRNG) for fast, repeatable simulations and games; use a cryptographically secure PRNG (CSPRNG) for passwords, tokens, keys, and other secrets; choose a true or hardware RNG (TRNG/HRNG), or a signed external service, when physical provenance or independently verifiable public results are required.
What “random” means
Randomness is not one binary property. Depending on the task, you may need:
As an Amazon Associate I earn from qualifying purchases.
- Unpredictability: an observer cannot forecast the next value.
- Uniformity: outcomes occur with the intended probabilities.
- Independence: previous outputs do not provide useful information about later ones.
- Reproducibility: the same seed recreates a sequence for tests or simulations.
- Auditability: others can verify how a result was produced.
- Physical nondeterminism: values originate from a physical process rather than only an algorithm.
A sequence can be statistically convincing yet predictable, so passing randomness tests does not by itself make a generator secure.
PRNG, CSPRNG, and TRNG compared
| Type | How it works | Strengths | Limitations | Good uses |
|---|---|---|---|---|
| PRNG | A deterministic algorithm expands a seed into a sequence. | Very fast, inexpensive, reproducible. | Anyone who obtains the seed or state may reproduce outputs; ordinary PRNGs are not for secrets. | Simulations, procedural content, randomized tests, many non-adversarial games. |
| CSPRNG | A PRNG designed to resist prediction and state-recovery attacks when correctly seeded and implemented. | Suitable for security-sensitive values; usually local and low-latency. | Still depends on seed entropy, state protection, correct API use, and implementation quality. | Passwords, reset links, session IDs, API keys, nonces, salts, keys and one-time codes. |
| TRNG/HRNG | Samples a physical phenomenon such as electronic or atmospheric noise. | Physical source; useful where independent provenance is required. | May be slower, remote, costly, biased, unavailable, or difficult to audit; physical origin alone does not prove security or fairness. | Public drawings, specialized hardware, compliance or audit requirements. |
NIST’s SP 800-90 framework separates entropy sources, deterministic mechanisms and constructions that combine them. SP 800-90A Rev. 1 specifies hash-, HMAC- and block-cipher-based deterministic mechanisms: NIST SP 800-90A Rev. 1. NIST’s publication list identifies SP 800-90C as final on September 25, 2025, while SP 800-90A Rev. 2 was listed as a pre-draft call for comments dated September 4, 2025: current NIST publication status. A NIST recommendation, a FIPS-validated module, a vendor marketing claim and a statistical test are different things.
#1 Best Overall
- Roll A Random Number 1 to 10,000,000!
- 7 Dice Set
- Great for Random Numbers & Loot in RPGs
- The Dungeon Master's Friend
Entropy and how computer randomness works
In this context, entropy is uncertainty available to the generator. It can come from operating-system events, hardware sources or measured physical noise. A large output is not necessarily high-entropy output: expanding a weak seed only produces more data, not more unpredictability. A timestamp may yield a 128-bit-looking sequence while an attacker who narrows the timestamp to a few seconds faces very little uncertainty. NIST discusses min-entropy, a worst-case measure, in its SP 800-90A documentation.
Robust systems gather and assess entropy, condition it, use a deterministic random-bit generator, protect its internal state and periodically reseed. They monitor source health and fail safely rather than silently falling back to a predictable source, including during early system startup.
Choosing an RNG
| Requirement | Recommended choice | Reason |
|---|---|---|
| Repeatable simulation or test | Ordinary PRNG with a recorded seed | Reproducibility and speed matter; attackers do not. |
| Game randomness without an adversarial security consequence | Quality PRNG | Fast and easy to debug; document the algorithm and seed policy. |
| Password, token, key, nonce or reset link | Platform or language CSPRNG | Designed to resist prediction; keep outputs and state secret. |
| Public lottery, contest or disputed allocation | Signed randomness service or documented public draw | Provides provenance and verification, not merely a random-looking result. |
| Physical randomness specifically required | Documented TRNG/HRNG | Use when procurement, compliance or public trust calls for an external physical source. |
Generate random values safely
Python
For simulation work, Python’s random module is appropriate:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →import random
n = random.randint(1, 100) # inclusive
For secrets, use secrets:
import secrets
n = secrets.randbelow(100) + 1 # 1 through 100
token = secrets.token_urlsafe(32)
secrets.randbelow() performs suitable range selection instead of asking you to implement a potentially biased modulo operation. Check the version-specific random documentation and secrets documentation.
Browser JavaScript
Use Web Crypto for security-sensitive browser values, not Math.random():
Rank #2
- Roll A Random Number 1 to 10000!
- 4 Dice Set (UNIT, TENS, HUNDREDS, THOUSANDS)
- Great for Random Numbers & Loot in RPGs
- The Dungeon Master's Friend
const array = new Uint32Array(1);
crypto.getRandomValues(array);
const value = array[0];
See Crypto.getRandomValues() and MDN’s Math.random() guidance.
Node.js
import { randomInt, randomBytes } from "node:crypto";
const n = randomInt(1, 101); // 1 through 100
const token = randomBytes(32).toString("base64url");
Here the lower bound is inclusive and the upper bound is exclusive. Confirm the convention for your installed version in the Node.js crypto documentation.
Operating-system APIs
Prefer your platform’s standard cryptographic API. Reading /dev/urandom casually in a shell is not a universal security recipe: encoding, blocking behavior, permissions and platform differences still matter.
Fair integers, ranges and modulo bias
Define the range before writing code: inclusive [min, max], exclusive upper bound [min, max), or a decimal interval such as [0, 1). Also specify whether sampling is with or without replacement.
Modulo bias occurs when a source range is not evenly divisible by the target range. If bytes run from 0 through 255 and you calculate byte % 10, six results receive 26 source values and four receive 25, so outcomes are not uniform. Use rejection sampling or a standard-library function that implements it. Also check maximum endpoints, negative ranges, floating-point rounding and conversions of large integers through low-precision floating-point numbers.
Rank #3
- ★【Odd Numbered Dice Set】- The complete 10pcs dice set fulfill all your desire for odd number dice; Each set includes one of each of: D3, D5, D7, D9, D11, D13, D15, D17, D19, D25, completed accessories to meet your game needs;
- ★【Easy to Read and Well Balanced】- These amber dice have black numbers on each side, every number can be sit very well. We design the dice according to principle of every face of each dice has same area, and each face has same distance to dice core. The dice are well balanced and give you random number of each rolling;
- ★【Translucent, Solid and Durable】- these dice are made of strong and quality polyresin, waterproof and wear-resistant, not easy to break and fade, with smooth surfaces, comfortable to hold, equipped with a black velvet bag for storage and guard the dice. You can impress fellow players with this upgraded translucent dice;
- ★【Multi-functional Scene】- These dice can be used in a variety of chess and card games, RPG card games, role-playing, math teaching, providing you and your partners with more game entertainment possibilities; It is also a beautiful and surprising gift.
Selection, shuffling and weighted choices
- One item: select uniformly from the complete, validated list.
- Several items with replacement: an item may appear again.
- Several items without replacement: remove each selected item before the next draw.
- Shuffle: use a library implementation or Fisher–Yates; do not sort by random keys, which can be biased and inefficient.
- Weighted choice: define whether weights are probabilities, relative scores or ticket counts, then validate their total and interpretation.
For a giveaway or lottery, preserve the entrant list, selection rule, randomness source, timestamp, software version and (when appropriate) a seed or signed result. A high-quality RNG cannot fix duplicated entries, omitted participants, changed inputs or incorrect weights.
Free tools Windows power users keep installed
One-click scans. No signup required.
Online random-number generators
An online generator is convenient for low-stakes choices, but ask who supplies the entropy, whether output is local or remote, whether requests and inputs are logged, whether results can be reproduced or verified, what happens during an outage, and whether API quotas or billing apply. Never send passwords, private keys or confidential data to a remote service merely to obtain randomness.
RANDOM.ORG says its service uses atmospheric noise and offers HTTP and JSON-RPC interfaces: HTTP API. Its Basic API documents integer, sequence, fraction, Gaussian, string, UUID and blob methods; generateIntegers accepts n from 1 through 10,000 and bounds from −1,000,000,000 through 1,000,000,000: Basic API. The service distinguishes Basic and Signed APIs; Signed output is intended for applications needing proof of authenticity and integrity, including audits, finance, games and lotteries: API dashboard.
RANDOM.ORG’s billing page says generated-value requests are billable while usage and verification methods are non-billable. Its example for a “Virtual Item Gambling” license shows a $30 monthly base cost with 30,000 included requests; that is an example tier, not universal pricing: billing details. Automated clients should not issue multiple simultaneous requests and may be blocked for noncompliance: client guidance. For most application secrets, a local operating-system CSPRNG is simpler, faster and more private than a remote atmospheric-noise service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Testing randomness
NIST’s statistical test program includes frequency, runs, longest-run, approximate-entropy and related tests: NIST random-bit generation program. Tests can reveal certain distribution failures, but they require sufficiently large samples and can produce false positives or negatives. Passing them does not prove unpredictability, correct seeding, protected state or resistance to compromise.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsRank #4
- 6 sided dice, each side is numbered 1-6
- Sturdy plastic
- Supports hands-on number and operations activities
- Dice measure 3/4"
- Set contains 3 red, 3 yellow, 3 blue, 3 green dice (Set of 12)
Common RNG mistakes
- Using
Math.random()for secrets. - Seeding with the current time or a predictable counter.
- Applying
% rangewithout rejection sampling. - Reusing a nonce where a protocol requires uniqueness.
- Logging tokens, seeds or generated keys.
- Assuming a TRNG is automatically secure or fair.
- Failing open when secure system randomness is unavailable.
- Confusing random order with random selection.
- Using weighted selection when requirements call for uniform selection.
- Leaving a deterministic test seed enabled in production.
- Using a remote API where privacy, availability or latency rules out the dependency.
Frequently Asked Questions
Are random numbers really random?
It depends on the generator and the property required. TRNGs sample physical processes; PRNGs are deterministic but can look statistically random; CSPRNGs are designed to make outputs difficult to predict.
What RNG should I use for passwords and tokens?
Use the operating system or language CSPRNG, such as Python’s secrets, browser Web Crypto or Node’s crypto module. Do not use Math.random() or an ordinary simulation PRNG.
Can random numbers be reproduced?
Ordinary PRNG sequences can be reproduced when the algorithm and seed are retained. CSPRNG outputs should not be reproducible by an attacker, while TRNG outputs generally cannot be recreated unless the draw’s evidence or signed record is preserved.
Does a TRNG guarantee security?
No. Physical origin does not guarantee unbiased output, secure conditioning, protected transport, correct health tests or fair selection.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




