RSA Key Pair Generator
Runs locally in your browserGenerate RSA public and private keys as PEM in your browser
Larger keys are stronger but slower to generate.
Advanced
Public exponent is fixed at 65537.
Private key (PKCS#8 PEM)
Public key (SPKI PEM)
Keys are generated in your browser and are never saved, logged or sent.
About RSA key pairs
This tool creates RSA key pairs with the Web Crypto API built into your browser. Choose 2048, 3072 or 4096 bits; 2048 is the default. The public key is exported as SPKI PEM (BEGIN PUBLIC KEY) and the private key as PKCS#8 PEM (BEGIN PRIVATE KEY), the formats most libraries and servers accept. Under Advanced you can generate a key for encryption (RSA-OAEP) or signing (RSA-PSS) with SHA-256, SHA-384 or SHA-512. The public exponent is always 65537.
How to use
Choose a key size, optionally open Advanced to pick the purpose and hash, then select Generate key pair. Generation can take a few seconds for larger keys. Copy or download each key separately as public-key.pem and private-key.pem. Changing an option or selecting Clear removes the current keys.
Security and privacy
Keys are generated on your device and stay in page memory only. CodingTool does not save, log or send them, and they disappear when you clear the tool or leave the page. Store the private key in a secret manager or protected file, and share only the public key.
