RSA Key Generator

Key size

About this tool

An RSA key pair is generated with the browser's WebCrypto (crypto.subtle.generateKey) and exported as PEM: PKCS#8 for the private key and SPKI for the public key. The public exponent is the standard 65537.

2048 bits is today's common baseline; choose 3072 or 4096 for long-lived keys. 4096 can take a few seconds while large primes are found. The PEM output is readable by OpenSSL, Node.js, Java and others.

Keys are created on this device and never sent anywhere. Still, production private keys should be created on the server or in a key management service; use this for development and testing.

FAQ

Are keys sent to a server?

No. They are created in your browser and never sent.

OpenSSH format (ssh-rsa)?

Only PEM (PKCS#8/SPKI). Convert the public key with ssh-keygen -i -m PKCS8 -f public.pem.

Which size should I pick?

2048 for general use; 3072 or 4096 for long-lived or high-security keys.

Related tools