About RSA Key Generator
Many systems still ask for RSA: older SSH servers, SAML and OAuth providers, JWT RS256 signing, code-signing and TLS tooling. This page opens on a 3072-bit RSA pair written as PEM, the -----BEGIN PUBLIC KEY----- and -----BEGIN PRIVATE KEY----- blocks that OpenSSL, Java, Node, Python and Go all read directly.
Pick 2048 bits for compatibility with old software, 3072 for the current recommendation, or 4096 if a policy demands it; larger keys take a few seconds to find. The same pair can also be shown as OpenSSH or JWK. Everything happens in your browser and the private key is never sent anywhere.
How it works
- The pair is made by crypto.subtle.generateKey, the browser’s own Web Crypto implementation, and exported in raw form.
- PEM wraps the standard DER encodings (SPKI for the public key, unencrypted PKCS #8 for the private key) in Base64 at 64 characters a line.
- OpenSSH output is assembled from the key’s numbers in the SSH wire format: the public key as one authorized_keys line, the private key as an unencrypted openssh-key-v1 file, with the SHA-256 fingerprint ssh-keygen would show.
- JWK output removes Web Crypto’s own fields and sets kid to the key’s RFC 7638 thumbprint, so the public and private halves can be matched.
Questions
Which RSA size should I use?
2048 bits is still accepted almost everywhere and is the minimum anyone should use. 3072 bits matches current guidance for keys meant to last beyond 2030. 4096 bits is stronger again but slower to use.
What public exponent do the keys use?
65537, the standard choice in OpenSSL and every major library.
My software wants “BEGIN RSA PRIVATE KEY”. Will this work?
That is the older PKCS #1 wrapper. Most software accepts the PKCS #8 form given here; if yours does not, openssl pkey -in private.pem -traditional converts it on your own machine.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.