1001Ferramentas
🗝️ Security

RSA Key Pair Generator

Generate RSA key pairs (public and private) of 2048 or 4096 bits directly in your browser. Useful for SSH, JWT, asymmetric encryption and certificates. No data sent to servers.

⚠️ Security: Keys generated here are meant for development and testing. For production, generate them with ssh-keygen or openssl on a machine you control. The keys never leave your browser.

Common uses

  • SSH — passwordless login to Linux servers
  • JWT (RS256/RS512) — signing and verifying auth tokens
  • TLS/SSL — the key behind an HTTPS certificate
  • PGP/GPG — encrypting email and files
  • Code signing — signing software packages and releases

Test keys without opening a terminal

You need an RSA key pair to test JWT signing with RS256, experiment with asymmetric encryption, or simply see what a PEM looks like inside, and you would rather not memorize openssl flags. Pick 2048 or 4096 bits and a scheme (signing or encryption), click generate, and you get the public key as SPKI and the private key as PKCS#8, both in the PEM format that JWT libraries and openssl itself accept directly.

Generation uses the browser's Web Crypto API with public exponent 65537, the industry default. The algorithm choice matters because in Web Crypto a key is born tied to its usage: PKCS#1 v1.5 and RSA-PSS sign, RSA-OAEP encrypts. Another detail that trips people up: the 'BEGIN PRIVATE KEY' header means PKCS#8, which is not the same as 'BEGIN RSA PRIVATE KEY' (PKCS#1); a library expecting one format rejects the other, and openssl converts between them.

For lab work, RS256 experiments and learning key formats, this does the job, and the keys never leave your browser. For production, generate on the target machine with ssh-keygen or openssl: a private key that has ever been displayed in a browser tab should not guard anything valuable. If SSH is the goal, note the output here is PEM, not the 'ssh-rsa AAAA...' line authorized_keys expects, so you would have to convert it. Generating 4096 bits takes a few seconds and the time varies: that is the random prime search.

Frequently asked questions

Can I use these keys on a production server?
Not recommended. Everything is generated in your browser and nothing is uploaded, but for production the right move is to create the key directly on the target machine with ssh-keygen or openssl, so it never touches a web page.
Which algorithm should I pick: PKCS#1 v1.5, OAEP or PSS?
It depends on the job: v1.5 is the classic signature scheme (the RS256 in JWTs), PSS is the modern signature scheme, and OAEP is for encrypting data. In Web Crypto this choice defines what the key is allowed to do, which is why you pick it before generating.
2048 or 4096 bits?
2048 generates quickly and is still accepted for most current uses. 4096 buys extra safety margin at the cost of slower generation and slower operations. For testing, 2048 is almost always enough.

Related Tools