RSA Key Pair Generator

Generate RSA key pairs using the browser's Web Crypto API. Choose between RSA-OAEP (for encryption) and RSA-PSS (for digital signatures). Keys are generated locally and never leave your browser. The public key can be shared; the private key must be kept secret.

Privacy: this tool processes your data entirely in your browser. Nothing you paste or type is sent to the server.

RSA-2048 is sufficient for most applications. RSA-4096 provides extra margin.

Choose based on your use case.

Result

Enter your values and press Calculate — the result appears here.

Worked examples

Generate RSA-2048 for encryption

  • bits = 2048
  • purpose = encrypt

Result: Public and private key pair in JWK format.

Frequently asked questions

What is the difference between RSA-OAEP and RSA-PSS?

RSA-OAEP is for encryption - anyone with the public key can encrypt, only the private key holder can decrypt. RSA-PSS is for digital signatures - the private key holder signs, anyone with the public key can verify.

Which key size should I use?

RSA-2048 is sufficient for most applications and is widely supported. RSA-4096 provides extra security margin but is slower. For new applications, consider ECC (ECDSA/ECDH) which provides equivalent security with smaller keys.

Is my private key stored anywhere?

No. The private key is generated in your browser's memory and never stored, logged, or transmitted. Copy it immediately - refreshing the page generates new keys.

Copied!