Security & Cryptography
RSA Key Pair Generator
Generate an RSA public and private key pair in PEM format.
Free foreverRuns in your browserNo sign-up
Keys are generated in your browser with the Web Crypto API and never leave your device. Keep the private key secret and share only the public key.
About the RSA Key Pair Generator
Generate an RSA key pair with a public key and a private key in standard PEM format.
Choose 2048, 3072 or 4096 bits, then copy the keys for use with signing, verification and encryption.
Keys are generated in your browser with the Web Crypto API and never leave your device.
Key features
- 2048, 3072 or 4096-bit keys
- Public key in SPKI PEM, private in PKCS#8 PEM
- Copy each key with one click
- Runs entirely in your browser
How to use
- 1Choose a key size.
- 2Click generate to create the pair.
- 3Copy the public and private keys.
Examples
2048-bit pair
Input:
2048 bitsOutput:
PUBLIC KEY and PRIVATE KEY blocksThe public key can be shared; keep the private key secret.
Stronger key
Input:
4096 bitsOutput:
A larger, slower but stronger key pairHigher bit sizes are harder to break but slower to use.
Frequently asked questions
- Which key size should I choose?
- 2048 bits is a common default. Choose 3072 or 4096 bits for stronger, longer-term security at the cost of slower operations.
- What format are the keys in?
- The public key uses SPKI PEM and the private key uses PKCS#8 PEM, which most libraries and tools accept.
- Are the keys uploaded?
- No. They are generated locally with the Web Crypto API and never sent anywhere.
