Encrypt text with AES-256-GCM using a key derived from your passphrase, with a fresh random salt and IV.
RSA Key Pair Generator
Generate an RSA key pair in your browser and export it as PEM, with a SHA-256 fingerprint.
- Free
- No sign-up
- Runs in your browser
Input
The common minimum today
Ready
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
Choose a key size and the pair is generated in your browser. 4096 bits takes noticeably longer.
- 2
Save the private key before leaving the page: it is shown once and cannot be recovered from here.
- 3
The public key is exported as SPKI and the private key as PKCS#8, which is what OpenSSL and most libraries expect.
Questions about RSA Key Pair Generator
Is a key generated in a browser safe to use?
The randomness is: Web Crypto uses the platform CSPRNG, the same source a command-line tool uses. The practical risks are elsewhere - a browser extension with page access could read the key, and it is easy to lose. For anything long-lived, `ssh-keygen` or `openssl` on a machine you control is the better habit.
Which size should I pick?
2048 bits is the usual minimum and is still considered adequate. 3072 gives roughly 128-bit security and is the sensible choice for a long-lived key. 4096 costs you generation time and slower operations for little practical gain. If you are choosing freely, Ed25519 is better than any of them.
Why is my private key not encrypted?
Web Crypto exports PKCS#8 unencrypted. Add a passphrase yourself: `openssl pkcs8 -topk8 -in private_key.pem -out encrypted.pem`. An unencrypted private key on disk is usable by anyone who can read the file.
Is my data sent anywhere?
No. This tool runs as JavaScript inside your browser tab. There is no network request carrying your input, nothing is written to a server log, and it keeps working with your connection switched off. You can confirm it in the browser’s network panel. That matters more here than elsewhere on the site: developer tools handle tokens, keys and production data.
Does the RSA Key Pair Generator work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the RSA Key Pair Generator keeps working with the network switched off and nothing is ever sent to a server.
Related tools
Other tools you might reach for next.
Decrypt AES-256-GCM output produced by the encryption tool, verifying the authentication tag.
Generate an Ed25519 key pair in your browser and export it as PEM, with a SHA-256 fingerprint.
Compute a SHA-256 fingerprint of a public key or certificate so you can compare it against a published value.
Format and indent JSON, with optional alphabetical key sorting and a precise syntax error when it will not parse.
Strip every byte of insignificant whitespace from JSON and report the saving.
Check that JSON is syntactically valid, report its structure, and flag duplicate keys that JSON.parse accepts silently.
Compare two JSON documents structurally, by path, distinguishing a type change from a value change.