Random Prime Number Generator

Pick random prime numbers from 2 to one million for test data and number-theory exercises.

About Random Prime Number Generator

Pick random prime numbers between 2 and 1,000,000. Prime numbers are used in hashing examples, key generation teaching, and test data for algorithms that need primes.

The tool tests each candidate by trial division, which is fast for numbers this size.

How to use it

  1. Enter how many primes you want (up to 100).
  2. Press Generate for a new set.
  3. Copy the list.

Questions

Is my text uploaded?

No. Everything runs in your browser; nothing you type or generate is sent to a server.

Are these the same every time?

No. Each press picks new random primes, and the same prime can appear more than once in a batch.

Are these primes safe for cryptography?

No. Real cryptographic primes are hundreds of digits long and generated with dedicated libraries.

More Math & Randomness tools

Home · All Tools · Blog