RSA Key Generator
Generate an RSA key pair with 2048, 3072, or 4096-bit modulus.
Generate an RSA key pair and export as PEM. Free, offline, runs entirely in your browser. Read more Show less
What is RSA?
RSA is a public-key cryptosystem used for encryption, key exchange, and digital signatures. A key pair consists of a private key (kept secret) and a public key (shared freely). RSA is defined in RFC 8017 (PKCS #1 v2.2).
This tool generates a fresh key pair using the browser Web Crypto API. The keys are exported in PEM format, the same encoding used by OpenSSL, SSH, and most TLS tooling. The private key is exported as PRIVATE KEY (PKCS#8) and the public key as PUBLIC KEY (SPKI).
How to use
Choose a key size. 2048 bits is the minimum recommended for new systems; 3072 and 4096 are more future-proof but slower. Click Generate.
Generation is CPU-intensive. A 2048-bit key takes about 1 second, 4096-bit takes 5-15 seconds depending on your machine.
Copy each key into a file with the appropriate extension (.pem) or paste it into another tool.
FAQ
Are my keys sent anywhere?
No. Key generation is done locally by the browser's Web Crypto engine.
Which key size should I use?
2048 for compatibility and speed. 3072 or 4096 for long-lived keys. Anyone recommending 1024 today is out of date.
Can I import the keys elsewhere?
Yes. The PEM output is standard PKCS#8 and SPKI, readable by OpenSSL, Node.js, Python cryptography, and Java.
Are the keys cryptographically secure?
Yes. Web Crypto uses the operating system's cryptographic random source. The same primitive is used by TLS and every modern browser.