RSA Key Pair Generator
Generate an RSA public and private key pair in your browser and export SPKI and unencrypted PKCS#8 PEM. Generated keys are not saved by this tool; the site may load shared analytics and advertising scripts.
Generate a matching RSA public and private key pair in this browser and export them as PEM files.
Choose a key size, then generate a pair.
How to use this RSA key generator
- Choose a key size. Larger keys take longer to generate and process.
- Select Generate key pair; generation and export use your browser’s Web Crypto API.
- Copy or download each key only when you need it. The private PEM is not encrypted.
- Configure the RSA scheme and parameters in the application that will use these keys.
Formats and limits
The public key is SPKI PEM (PUBLIC KEY) and the private key is unencrypted PKCS#8 PEM (PRIVATE KEY). These formats contain generic RSA key material; they do not select RSA-OAEP, RSA-PSS, or another operation. This page generates keys with RSA-OAEP and SHA-256 as its Web Crypto configuration, but it does not encrypt, decrypt, sign, issue certificates, or manage production keys.
NIST guidance estimates roughly 112-bit, 128-bit, and up to 152-bit security strength for 2048-, 3072-, and 4096-bit RSA moduli. These are approximate comparisons, not a guarantee that a key size suits your protocol or risk. RSA is generally used to protect small values or establish keys, not to encrypt bulk files directly.
Key generation and export happen in this page, and generated keys are not saved by this tool. The site may load shared analytics and advertising scripts. Clearing the displayed output does not clear copied text from your clipboard; remove private key material there yourself. Do not use this page for high-value production keys without an appropriate security review.
Frequently asked questions
Which size should I choose?
Use the size required by your protocol or organization. Larger keys can take longer and the strength mapping above is only an estimate.
Does the PEM file tell software to use OAEP or PSS?
No. The exported SPKI and PKCS#8 data hold generic RSA keys. Your application must choose the scheme, hash, padding, and protocol parameters it needs.
Is the private key protected by a password?
No. The exported PKCS#8 PEM is unencrypted. Store it securely and avoid pasting it into untrusted services or shared devices.