About the RSA Key Generator
This tool makes an RSA key pair in your browser and shows the outputs you need. You pick 2048, 3072 or 4096 bits and the tool prints a private key in PKCS#8 PEM and PKCS#1 PEM formats plus an OpenSSH public key line. The key pair is generated with the browser Web Crypto API and nothing is sent to our servers. After the page loads you can work offline. People use this for testing TLS or SSH keys, creating deploy keys, or for development where you need PEM and OpenSSH formats quickly. The tool is simpler than many alternatives because it shows both PEM styles and an OpenSSH public line at once, and it supports 3072 bits as a middle option for longer lifetimes.
How to use it
- 1Choose 2048, 3072 or 4096 bits
- 2Click Generate
- 3Copy or download the PKCS#8 private PEM or the PKCS#1 private PEM
- 4Copy the OpenSSH public key line and save the private key securely
Worked example
Example: Choose 3072 bits and click Generate. The page shows a PKCS#8 private PEM starting with -----BEGIN PRIVATE KEY-----, a PKCS#1 private PEM starting with -----BEGIN RSA PRIVATE KEY-----, and an OpenSSH public line starting with ssh-rsa.
How it works
Makes an RSA key pair (2048, 3072 or 4096 bits) with the Web Crypto API and shows it as PEM in PKCS#8 and PKCS#1 form, plus an OpenSSH public key lineWorks in the browser with nothing to installSource: RFC 8017 PKCS #1 (RSA Cryptography Specifications)NIST SP 800-56B Rev. 2 (Recommendation for RSA Key Sizes). Last checked 5 November 2026.
What it is good for
- Generates keys locally in your browser with no upload
- Outputs private keys in both PKCS#8 and PKCS#1 PEM formats
- Provides an OpenSSH public key line ready to paste into authorized_keys
- Private PEMs are not passphrase-encrypted by the tool; use openssl or ssh-keygen to add a passphrase.
- No alternate algorithms are provided here; this tool is RSA-only.
Questions people ask
Is it safe to generate RSA keys in this browser tool?
If you generate keys with a Web Crypto client-side tool and nothing is sent to a server, the keys stay on your device. Check your browser devtools network tab if you want to confirm no uploads occur.
Which key size should I pick, 2048, 3072 or 4096?
Use 2048 bits for short-lived or low-risk keys. Choose 3072 bits for stronger protection and 4096 bits for even longer lifetimes. NIST guidance maps 3072 bits to about 128-bit security.
What formats does the tool give me?
The tool shows the private key as PKCS#8 PEM and PKCS#1 PEM, and it prints an OpenSSH public key line. You can copy or download those files directly.
Can I export a passphrase-protected private PEM from the tool?
This tool exports unencrypted PKCS#8 and PKCS#1 PEM files. If you need a passphrase, run openssl or ssh-keygen locally to add encryption.
What does the OpenSSH public line contain?
The OpenSSH public line starts with ssh-rsa followed by base64 and an optional comment. You can paste that line into an authorized_keys file or an SSH provider's key field.
Should I use RSA or a modern curve like Ed25519?
For new systems, Ed25519 or ECDSA often gives smaller keys and faster operations. RSA stays useful for compatibility with older systems and some TLS setups.
Help keep every tool free
FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.