What is the Random Prime Number Generator?
A prime number is a whole number greater than 1 whose only divisors are 1 and itself — 2, 3, 5, 7, 11 and so on. This generator picks random primes from any range you choose, from a minimum of 2 up to a maximum of 1,000,000,000. With the default settings it returns ten primes below 1,000, such as 101, 587 or 857.
Every result is checked for primality before it is shown, so you can rely on the list for homework, puzzles or test cases. You can request up to 100 primes per click; keep in mind that a very narrow range may contain fewer primes than you ask for, so widen it if you need a longer list.
Randomness comes from the Web Crypto API in your browser and nothing is stored on a server. Results can be copied with one click or exported as CSV, JSON or TXT, and a shareable link keeps your range and count. Press Enter or Space to draw a new set without touching the mouse.
How to use the Random Prime Number Generator
- Enter the Minimum (2 or more) and Maximum (up to 1,000,000,000).
- Set How many? to between 1 and 100.
- Press Generate to get your random primes.
- Copy the list or export it as CSV, JSON or TXT.
Popular uses
- Math teachers — create prime-spotting and factorization exercises.
- Programmers — get test inputs for primality and hashing functions.
- Puzzle makers — build number riddles and escape-room codes.
- Students — explore how primes thin out as numbers grow.
Why use RandNow?
- Instant & unlimited — no sign-up, no daily caps.
- Private by design — results are generated in your browser, not on our servers.
- Export-ready — copy, CSV, JSON and TXT downloads built in.
- Cryptographically random — powered by the Web Crypto API.
Fun facts about primes
2 is the only even prime; every other even number is divisible by 2. There are infinitely many primes, as Euclid proved more than two thousand years ago, yet they become rarer as numbers grow — there are 168 primes below 1,000 but the gaps between them widen further out. Large primes are the backbone of modern encryption, where multiplying two big primes is easy but factoring the result back is extremely hard. In class, ask students to confirm by hand that a small random prime has no divisors other than 1 and itself.
Change the range and press Generate again for new primes — it’s free and unlimited.
Frequently asked questions
Is 1 a prime number?
No. A prime must have exactly two divisors, 1 and itself, so the smallest prime is 2.
What is the largest prime I can generate?
You can set the maximum as high as 1,000,000,000, so any prime up to one billion can appear.
How many primes can I get at once?
Up to 100 per click, as long as your range contains enough primes.
Are the results guaranteed to be prime?
Yes, every number is checked for primality before it is displayed.