RSA Key Pair Generator (2048 / 4096-bit)
Generate RSA key pairs and export them as PEM.
4096-bit generation can take a few seconds — the search for large primes is genuinely hard work.
About this tool
RSA remains the most widely deployed public-key algorithm. This generator uses the Web Crypto API to create an RSA-OAEP key pair locally — the private key is generated inside your browser's cryptographic engine and is never transmitted anywhere.
Keys export in standard PEM containers: PKCS#8 for the private key and SPKI (SubjectPublicKeyInfo) for the public key, ready for OpenSSL, ssh, or your application code. 2048 bits is the accepted minimum today; use 4096 for long-lived keys.
Like everything on encrypt.tools, this runs entirely in your browser — nothing you enter is transmitted or stored.
Frequently asked questions about RSA Key Generator
What key size should I use?+
2048 bits is the accepted minimum today. Use 3072 or 4096 for keys that must stay secure for many years. Larger keys are slower to generate and use.
Are the keys generated on a server?+
No — they are generated in your browser with the Web Crypto API and never transmitted. Save the private key before closing the tab; it cannot be recovered afterward.
What formats are the keys in?+
Standard PEM: PKCS#8 for the private key and SPKI (SubjectPublicKeyInfo) for the public key, compatible with OpenSSL and most libraries.
Related tools
RSA Encrypt / Decrypt
Encrypt with a public key, decrypt with a private key
ECDSA · P-256/384/521ECC Key Generator
Generate P-256, P-384, and P-521 key pairs as PEM
ED25519 · X25519Ed25519 / X25519 Keys
Modern Curve25519 signing and key-exchange keys
OPENPGP · RFC 9580PGP Encrypt / Decrypt
Encrypt with a public key, decrypt with a private key