RSA Key Generator
Generate an RSA key pair in the browser and export it as PEM or JWK, for signing or encryption.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the rsa key generator
- Choose a key size, purpose and hash.
- Generate the pair — 4096 bits can take several seconds.
- Save the private key somewhere you control before leaving the page.
About this tool
This generates a key pair using the browser's own Web Crypto implementation and the operating system's randomness, then exports it as PEM or JWK. Nothing is transmitted, and no copy exists anywhere but this tab.
That property is the entire reason to generate keys locally, and the reason to be wary of sites that do it for you. A private key that has been sent to a server — or generated on one — has to be assumed known by whoever runs it. There is no way to verify a remote generator's claim not to keep a copy, which makes the claim worth nothing.
The randomness matters more than the key size. Almost every famous RSA failure in the field has been a failure of entropy rather than of the algorithm: devices generating keys at first boot with too little randomness have produced keys sharing prime factors with each other, and those were factored en masse by anyone who noticed. Web Crypto draws from the operating system's pool, which is the right source.
On size, 2048 bits remains acceptable under current guidance and 3072 is the conservative choice for a new key. 4096 is slower to generate and to use for little practical gain — the jump from 3072 to 4096 buys less additional security than the numbers suggest. Signing and encryption use different algorithms, RSASSA-PKCS1-v1_5 and RSA-OAEP respectively, and a key generated for one is not usable for the other, which is why the choice is made up front.
Common uses
- Creating a key pair for signing or verifying data.
- Producing a JWK for a service that expects one.
- Generating a test key without a terminal.
Frequently asked questions
- Is it safe to generate keys in a browser?
- Here, yes: generation uses the browser's audited Web Crypto implementation and the key never leaves the tab. A remote generator is the risky kind, because its claim not to keep a copy cannot be verified.
- What key size should I choose?
- 2048 bits is acceptable under current guidance, 3072 is the conservative choice for a new key, and 4096 is slower for little practical gain.
- Is the key stored anywhere?
- No. It exists only in this tab, and leaving the page discards it. Save the private key before navigating away.
Related tools
Secure Password Generator
Generate strong random passwords using the browser's cryptographic random number generator.
File Encryption
Encrypt any file with AES-256-GCM and a password, entirely in your browser.
Text Encryption
Encrypt and decrypt text with AES-256-GCM and a password, entirely in your browser.
JWT Decoder
Decode a JSON Web Token to inspect its header, payload, expiry and claims.