Category 9 — Cryptography / Security
Decompose integers into prime factors using trial division or Pollard's Rho algorithm.
Number to Factor box, or tap a sample like 840, 104729 (prime), or 1234567890 to fill it in.Trial Division or Pollard's Rho.Factor (or press Enter) to run the factorization.Prime vs Composite status, and compute time.Steps panel to see how the algorithm found each factor.Copy to copy the full number = factors expression to your clipboard.See the fundamental theorem of arithmetic in action: every integer greater than 1 factors uniquely into primes, and this tool shows that decomposition directly.
An RSA modulus is just the product of two large primes. Factoring that number breaks the key — which is exactly why factoring is considered hard.
The Status stat reports Prime or Composite instantly, and the factorization itself is the proof of which one it is.
Run the same number through Trial Division and Pollard's Rho to see how their step counts and compute times differ in practice.
Follow the Steps panel to reproduce a factorization yourself, or double-check answers when teaching or doing homework.
Everything runs in your browser. Your numbers are never uploaded, logged, or sent to a server.
It decomposes a whole number into its prime factors. For example, 840 becomes 2^3 × 3 × 5 × 7, and the result is shown both as an expression and as a set of stats.
Trial Division tests every candidate divisor up to the square root of the number — simple and deterministic. Pollard's Rho is a randomized algorithm that finds a nontrivial factor much faster on average for numbers with small factors, using a pseudorandom sequence and gcd.
0 has no prime factors, and 1 is a unit rather than a prime (by definition). The tool reports each case explicitly instead of trying to factor them.
Non-negative integers only — digits 0–9. Negative numbers, decimal points, and non-numeric characters are ignored and will not produce a result.
RSA encryption relies on the fact that multiplying two large primes is easy but factoring the product back apart is extremely hard. This tool makes that one-way hardness tangible.
It uses JavaScript BigInt, so input size is not limited to 32 or 64 bits. However, both algorithms are still exponential for large semiprimes, so a number with two huge prime factors can be slow and may stall the page.
Never. All computation happens locally in JavaScript. Your numbers are not sent to, stored on, or logged by any server.