RSA Key Pair Generator
Generate secure RSA public and private key pairs locally in your browser.
Warning: Never share your private key. We do not store this key; if you lose it, it cannot be recovered.
About RSA Key Generation
RSA keys are generated by finding two large prime numbers, $p$ and $q$. The security of RSA relies on the difficulty of factoring the product of these two primes ($n = p \times q$).
Key Sizes
- 512 bits: Extremely insecure by modern standards. Easily broken. Use only for educational purposes or very specific legacy testing.
- 1024 bits: Considered insecure for most high-security applications today, but faster to generate and use.
- 2048 bits: The current industry standard. Offers a good balance between security and performance.
- 4096 bits: Extremely secure, but generation and usage are significantly slower. Recommended for long-term identity keys.
Private Key Password
You can optionally protect your private key with a password. If you set a password, the generated PEM block will be encrypted, and you will need to provide the same password whenever you use the key for decryption or signing.