RSA Key Generator
Generate RSA public and private key pairs in PEM format
RSA Key Generator Online — Free PEM Key Pair Generator
Generate RSA public/private key pairs instantly in your browser. Choose between 2048-bit (fast, still secure) or 4096-bit (maximum security) keys, and select the use case: encryption (RSA-OAEP) or digital signatures (RSASSA-PKCS1-v1_5). Keys are exported in standard PEM format and can be downloaded directly. Your browser's native Web Crypto API handles all cryptographic operations — no data leaves your device.
How It Works
- Select the key size: 2048 bit (recommended) or 4096 bit (higher security)
- Choose the use case: Encryption or Signing
- Click Generate Keys — generation takes 1–5 seconds for 4096 bit
- Copy or download the Public Key and Private Key in PEM format
Frequently Asked Questions
What is the difference between 2048 and 4096 bit?
Both are considered secure today. 2048-bit is the standard and is fast to generate. 4096-bit provides a larger security margin but takes longer to generate and slightly slower to use in operations.
Is my private key safe?
Yes. All key generation happens locally in your browser using the Web Crypto API. No data is sent to our servers. Your private key never leaves your device.
What is PEM format?
PEM (Privacy Enhanced Mail) is the standard text format for cryptographic keys. It encodes binary key data in Base64 with a header (-----BEGIN PUBLIC KEY-----) and footer. It is compatible with OpenSSL, SSH, TLS certificates and most programming languages.
What is the difference between encryption and signing keys?
Encryption keys (RSA-OAEP) are used to encrypt and decrypt data. Signing keys (RSASSA-PKCS1-v1_5) are used to create and verify digital signatures. The underlying RSA math is the same, but the key usage flag differs, so they are not interchangeable.