About this tool
Creates RSA key pairs with WebCrypto and exports them as a PEM public key (SPKI) and a PEM private key (PKCS#8), the formats OpenSSL, Node.js, Java and most libraries read directly. JWK and OpenSSH versions of the same key are one tab away. All of it happens in your browser.
How to use RSA Key Generator
- Pick the key size.
- Click Generate key pair and wait a moment for larger sizes.
- Switch between PEM, JWK and OpenSSH tabs.
- Copy or download the public and private key.
Frequently asked questions
Which size should I choose?
2048 bits is the minimum accepted today; 3072 bits matches 128-bit security and is a good default; 4096 is slower with modest extra margin.
My tool wants BEGIN RSA PRIVATE KEY. What do I do?
That is PKCS#1. Convert with: openssl pkey -in private.pem -traditional -out rsa.pem.
What public exponent is used?
65537, the standard value used by virtually all software.