Introduction

Semi-Prime Factorizer is a free online tool that generates random semi-prime numbers (product of exactly two primes) and factorizes them entirely in your browser. Supports numbers from 10 to 1000 digits.

How to use:

1. Enter a semi-prime manually, or use the slider to choose a digit count (10-1000) and click "Generate Semi-Prime".

2. Click "Factorize" to find the two prime factors.

3. Use the copy button to copy results.

Generate a Random Semi-Prime

Or enter a number to factorize:

Result:

About Semi-Prime Factorizer Online:

A semi-prime (also called biprime or 2-almost prime) is a natural number that is the product of exactly two prime numbers, not necessarily distinct. For example, 15 = 3 × 5 and 49 = 7 × 7 are both semi-primes.

Semi-primes play a critical role in cryptography, particularly in RSA encryption, where the security depends on the difficulty of factoring a large semi-prime into its two prime factors.

Algorithms Used:

Primality Testing: Miller-Rabin probabilistic primality test with multiple rounds for high confidence. Used to generate random primes and verify factors.

Factorization: Trial division for small factors (up to 1,000,000), Pollard's rho with Brent's cycle detection for medium numbers, and Lenstra's Elliptic Curve Method (ECM) with Montgomery curves and Stage 2 BSGS continuation for large numbers (40+ digits). ECM runs in parallel across all available CPU cores for maximum speed. For very balanced semi-primes, Fermat's factorization method is also applied.

All computation runs entirely in your browser using JavaScript BigInt in background Web Workers, keeping the page responsive during long operations. For ECM, multiple workers run independent curves in parallel, with real-time progress and ETA display. No data is sent to any server. Very large numbers (500+ digits) may take significant time to factorize.