Random Number Generators & Number Tools
Every number tool here draws from your device's cryptographic random source rather than a seeded software algorithm, and every one runs entirely in the browser. Pick a fixed-width generator when you need codes of an exact length, or the custom range generator when you need numbers between two arbitrary bounds.
13 tools in this category
4 Digit Random Number Generator
Random codes from 0000 to 9999, zero-padded and ready to use as PINs or verification codes.
Open6 Digit Random Number Generator
Six-digit codes from 000000 to 999999 — the standard shape for one-time passcodes.
Open5 Digit Random Number Generator
Five-digit values from 00000 to 99999 for codes, IDs and sample records.
Open3 Digit Random Number Generator
Short three-digit values from 000 to 999 for quick codes and classroom use.
OpenRandom Number Generator
Set any minimum and maximum and draw as many numbers as you need.
OpenRandom Number Generator 1–100
The classic 1 to 100 draw — one click, genuinely unbiased.
OpenRandom Number Generator 1–10
A quick 1 to 10 pick for games, decisions and small draws.
OpenRandom Lottery Number Generator
Unique, sorted picks for any lottery format — set the ball range yourself.
OpenRandom Even Number Generator
Random even numbers in any range, plus the full list from 1 to 100.
OpenRandom Odd Number Generator
Random odd numbers in any range, plus the full list from 1 to 100.
OpenRandom Prime Number Generator
Random primes in any range, plus the full list of primes under 100.
OpenFibonacci Number Generator
Random Fibonacci numbers, with the sequence listed in full.
OpenRandom Hex Code Generator
Random six-digit hex codes for colours, IDs and test data.
Open
Fixed-width codes versus arbitrary ranges
The digit generators exist because a code and a number are not the same thing. 42 and 0042 are the same integer, but only one of them is a valid four digit PIN — and dropping the leading zeros is the single most common way a batch of codes gets corrupted between a generator and a spreadsheet. The digit tools pad every result to a fixed width so that never happens.
The custom range generator is the opposite tool: no padding, no fixed length, any minimum and maximum you like including negative numbers. Use it for drawing winners, sampling spreadsheet rows, assigning turn order, or anything where the number is a position rather than a code.
What makes a random number generator trustworthy
Two things, and most online generators get the second one wrong. The first is the entropy source: these tools use the Web Crypto API, which reads the operating system's cryptographically secure pool, rather than Math.random(), which is seeded predictably enough that its output can be reconstructed by anyone who has watched enough of it.
The second is how that entropy is mapped onto your range. Taking a random 32-bit value modulo your range is the obvious approach and it is quietly biased: whenever the range is not a power of two, the lowest numbers come up measurably more often. These tools discard draws that land in the uneven remainder and redraw instead, so the distribution is genuinely flat.
You can see the difference at scale rather than in a single draw. Run a biased generator ten thousand times over 1–100 and the low numbers pull ahead of the high ones; run an unbiased one and the counts stay level.
Choosing a length for codes
Each digit multiplies the guessing space by ten. Three digits gives 1,000 possibilities, four gives 10,000, five gives 100,000 and six gives a million. For anything protecting access, four digits is the practical floor and only works when paired with an attempt limit — a four digit PIN with unlimited guesses is not a security control.
Six digits is the standard for one-time passcodes, and it works there because the codes also expire in around thirty seconds. For a code that stays valid indefinitely, longer is meaningfully safer.
Frequently asked questions
Are these random number generators actually secure?
They use crypto.getRandomValues(), which is backed by the operating system's CSPRNG — the same source that seeds TLS session keys. Math.random() is never used anywhere on the site. Results are also mapped onto your range with rejection sampling, so there is no bias toward the low end.
Is anything I generate sent to a server?
No. Generation is client-side JavaScript. There is no back end that could receive it, no analytics script watching, and no logging. Values exist in your browser tab until you copy, export or close it.
Which generator should I use for a PIN?
The four digit generator for a standard bank-style PIN, or the six digit generator where the system allows it. Both keep leading zeros, which matters because 0042 is a valid PIN and 42 is not the same thing.
Can I generate numbers in bulk?
Every number tool takes up to 10,000 values per batch, with one-click copy of the whole set and CSV or JSON export. Repeat as often as you like — there is no rate limit and no account.
Can I use these for a prize draw?
The randomness is cryptographically secure and unbiased, which is the technical bar for a fair draw. Formal, regulated lotteries are a different matter — those generally require an audited and certified system with a verifiable record of every draw.