Free Online RSA Key Pair Generator with PEM, JWK and Fingerprints
Generate an RSA key pair in your browser with Web Crypto, at 2048, 3072 or 4096 bit. The public key comes out as PEM, as JWK and as an OpenSSH line, the private key as PKCS8 PEM, and both the OpenSSL and the ssh-keygen style SHA-256 fingerprints are worked out for you.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Use RSA Key Pair Generator
Step by step, start to finish.
Use 2048 bit unless you have been told otherwise, and choose signing or encryption. The choice is recorded in the key, so a key generated for encryption cannot be used to sign.
A 4096 bit key can take several seconds, because the browser is hunting for large primes. The page tells you how long it took, which is a useful sanity check that real work happened.
Both SHA-256 fingerprints appear: the one openssl gives for the DER, and the one ssh-keygen gives for the SSH wire format. Compare whichever matches the tool that is asking.
Public key as PEM, as JWK or as a single OpenSSH line, private key as PKCS8 PEM or JWK. The private exports stay blanked until you press Show, so the key does not appear in a screen share by accident.
Key Features
What this tool does, and what it does not do.
2048, 3072 and 4096 bit, generated by Web Crypto with a public exponent of 65537.
SPKI PEM and PKCS8 PEM, wrapped at 64 columns, plus the JWK form of each key.
A complete ssh-rsa line, built from the wire format, ready for authorized_keys.
The openssl DER figure in hex and the ssh-keygen figure in base64, side by side.
Private exports stay blanked until you press Show, so nothing leaks into a screen share.
No history and no saved setups. A private key never reaches browser storage.
About RSA Key Pair Generator
An RSA key pair is two numbers that share a modulus: one that anybody may hold and one that nobody else may. Generating a pair is not a formatting exercise, it is a search for two large primes, which is why a 4096 bit key takes noticeably longer than a 2048 bit one and why the time taken is printed on this page. The search happens in Web Crypto, the browser own cryptographic implementation, which is the same code path that negotiates the HTTPS connection you are reading this over.
The awkward part of a key pair is never the key, it is the encodings. The same public key is a DER structure inside a PEM envelope, a JSON object with two base64url numbers in it, and a length prefixed binary blob in an authorized_keys line, and each of those has its own fingerprint. This page produces all three from one generated key and shows both SHA-256 fingerprints, because the usual reason someone reaches for a tool like this is that two programs are disagreeing about what the same key is called.
The OpenSSH line is built here by hand rather than by a library, because the format is three pieces: the string ssh-rsa, the public exponent and the modulus, each written with a four byte big endian length in front of it, with a leading zero byte added wherever the top bit would otherwise read as a negative number. That is the whole specification, it needs no dependency, and writing it out is a better use of twenty lines than shipping a megabyte of someone else code.
What the page will not do is pretend that a key made in a tab is a key for production. Web Crypto gives you sound arithmetic, not a sound custody chain, and a private key that has been in a clipboard has been somewhere you cannot audit. Use this for fixtures, for a staging server, for testing a signature path or for comparing a fingerprint. For the key that guards something that matters, use ssh-keygen or openssl on the machine where the key belongs.
Frequently Asked Questions
Common questions about this tool.