Developer Tools
RSA Key Generator
Create an RSA public/private key pair in seconds — choose 2048 or 4096 bits and get ready-to-use PEM keys. Perfect for SSH, TLS testing, and encryption experiments. Everything runs in your browser with Web Crypto.
Keys are generated entirely in your browser with the Web Crypto API and never leave your device. For safety, private keys are not stored or autosaved.
What makes this tool different
2048 and 4096-bit
Generate the two most common RSA sizes with one click — no OpenSSL commands required.
Standard PEM output
Keys export as PKCS#8 (PRIVATE KEY) and SPKI (PUBLIC KEY) PEM, compatible with OpenSSL and most libraries.
Web Crypto generation
Key generation uses the browser's crypto.subtle.generateKey — no dependencies, no server.
Keys never leave device
Private keys are generated and displayed in-browser only; they are not uploaded, stored, or autosaved.
About this tool
RSA Key Generator: everything you need to know
RSA key pairs back a huge amount of everyday security: SSH access, TLS certificates, and public-key encryption. Generating one usually means reaching for OpenSSL and remembering the right incantation — which is overkill when you just need a quick test key.
OpenToolLab's RSA key generator builds a 2048- or 4096-bit key pair directly in your browser using the Web Crypto API. The result is two standard PEM blocks: a public key (SPKI) and a private key (PKCS#8) that drop into OpenSSL-based workflows and most language libraries.
Generation is local, so the private key never touches a server and is not autosaved to your device. That keeps it out of logs and local storage — though, as with any online generator, treat the output as development and test material rather than production-grade secrets.
Use the generated pair to prototype encryption, stand up a local TLS endpoint, or mock an SSH-style auth handshake, then move to machine-local generation for anything that goes to production.
FAQ
RSA Key Generator — frequently asked questions
How do I generate an RSA key pair online?
Pick 2048 or 4096 bits and click Generate. OpenToolLab's RSA key pair generator creates the key pair in your browser with Web Crypto and shows both the public and private keys as PEM text you can copy immediately.
How do I generate an RSA public or private key online?
Both keys are produced together as standard PEM. The public key is exported as SubjectPublicKeyInfo (BEGIN PUBLIC KEY) and the private key as PKCS#8 (BEGIN PRIVATE KEY) — copy whichever you need from the RSA public key generator or RSA private key generator output.
How do I generate an SSH RSA key online?
Generate an RSA key pair here; the keys are standard RSA PEM. For SSH, convert the public key to the OpenSSH authorized_keys format with ssh-keygen -i -m PKCS8, or use ssh-keygen -p -m PEM for the private key. This covers ssh rsa key generator and ssh public key generator needs.
How do I generate a 2048-bit RSA key online?
Select 2048-bit (or 4096-bit) and click Generate. 2048-bit is the current compatibility baseline; 4096-bit is stronger but slower to generate. Avoid 1024-bit, which is considered weak.
Can I generate an RSA key with a specific modulus or exponent?
The tool generates keys at 2048 or 4096-bit modulus using the standard public exponent 65537 (0x10001), which is what virtually all RSA implementations expect. This is the online RSA key generator with modulus/exponent most users need.
Can I generate an RSA key pair for RS256 JWTs here?
Yes. RS256 uses RSA keys — generate a pair in this RSA key generator (or in the JWT generator's RSA mode) and use the private key to sign RS256 tokens; the public key verifies them.
Do you provide PGP public key generation?
This tool generates RSA key pairs in PEM (PKCS#8/SPKI). PGP uses a different packet format; export the RSA keys here and convert with GPG if you specifically need a PGP public key.
Can this tool encrypt or decrypt with the RSA key?
This is an RSA key generator — it creates the public/private key pair. For encryption, decryption, or decoding a private key's contents, use the keys in your application or a tool like OpenSSL. The keys themselves never leave your browser.
Keep exploring