RSA Key Pair Generator
Generate RSA public/private key pairs in PEM format using the Web Crypto API. Nothing leaves your browser.
Frequently Asked Questions
An RSA key pair consists of a public key and a private key. The public key can be freely shared and is used to encrypt data or verify signatures. The private key must be kept secret and is used to decrypt data or create signatures.
2048-bit keys are the current minimum recommendation for most use cases. 4096-bit keys provide a higher security margin and are recommended when long-term security is required. 1024-bit keys are considered weak and should only be used for testing.
Yes. This tool uses the Web Crypto API built into your browser, which uses a cryptographically secure random number generator. No key material is ever sent to a server — generation happens entirely on your device.
The public key is exported in SPKI (Subject Public Key Info) format and the private key in PKCS#8 format, both PEM-encoded with Base64. These are the standard formats accepted by OpenSSL, SSH, and most TLS libraries.
Larger key sizes require finding larger prime numbers and performing more expensive modular arithmetic. A 4096-bit key has roughly 4× the computational cost of a 2048-bit key.