Prime Number Checker & Generator

Check if a number is prime (BigInt), generate primes up to N or within a range, and factorize numbers.

Check if Prime
Generate Primes
Note: For large ranges, a segmented sieve is used; keep (B − A) ≤ 2,000,000 for best performance.
How this works
  • Primality test uses deterministic Miller–Rabin for 64-bit and probabilistic for BigInt.
  • Generation uses the classic Sieve of Eratosthenes (and segmented sieve for ranges).
  • Factorization uses trial division by small primes (6k±1 optimization), suitable for moderately large inputs.

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.