Random Prime Number Generator

 

Generates a random prime number from 1 to 100, inclusive.

Generated locally in your browser with the Web Crypto API.

Pick a prime from any range

Set a minimum and maximum to draw a uniformly random prime number between those two values, inclusive. The lower bound is clamped to 2, the smallest prime, and the upper bound is capped at 1,000,000 so results stay instant.

Everything runs locally on your device. The range you enter and the primes you generate are not sent to a server.

Use cases

  • Practice number theory and math exercises
  • Build teaching examples for primes and factorization
  • Demo RSA, hashing, or hash-bucket sizing
  • Seed test fixtures that need a prime value