Ed25519, ECDSA and RSA keys as PEM, JWK and OpenSSH, round-trip tested
RSA Key Generator
Make an RSA key pair in the exact PEM flavour an older library or service asks for.
Loading tool…
How to use rsa key generator
Choose 2048, 3072 or 4096 bits.
Generate and wait for the round-trip check; 4096 bits can take a few seconds.
Pick BEGIN PRIVATE KEY (PKCS#8) or BEGIN RSA PRIVATE KEY (PKCS#1), whichever your software expects.
Copy or download the public and private keys.
What this tool does
- RSA with public exponent 65537 from the browser's Web Crypto.
- PKCS#8 and SPKI PEM, plus the older PKCS#1 RSA PRIVATE KEY and RSA PUBLIC KEY forms.
- JWK with all CRT parameters, and OpenSSH ssh-rsa keys.
How the result is verified
The PKCS#8 key signs a random message and the SPKI key verifies it, and the OpenSSH copy is parsed back and checked the same way. Sample keys were also checked with openssl pkey -check and openssl rsa -check.
Frequently asked questions
2048, 3072 or 4096 bits?
2048 is still accepted almost everywhere. 3072 matches 128-bit security and is a good default for keys that must last years. 4096 is slower and mainly for policies that require it.
What is the difference between PKCS#8 and PKCS#1?
Both hold the same RSA key. PKCS#8 (BEGIN PRIVATE KEY) wraps it with an algorithm label and works for every key type; PKCS#1 (BEGIN RSA PRIVATE KEY) is the older RSA-only form some tools still want.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
id_ed25519 and id_rsa key pairs in OpenSSH format, ready for ~/.ssh
Build and sign HS256, HS384 and HS512 tokens from your own claims
Decode JWT claims, see expiry, verify HMAC and public key signatures