# RSA Key Pair Generator

URL: https://phishdestroy.io/developer-tools/rsa-key-pair-generator
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Generate a 2048- or 4096-bit RSA key pair in your browser and copy both halves as PEM text, for example for test environments and demos.

## Example input

2048-bit key pair

```
Keep 2048-bit in the Key size menu and press Generate Key Pair.
```

A BEGIN PUBLIC KEY block of about 450 characters and a BEGIN PRIVATE KEY block of about 1,700 characters.

## FAQ

### What kind of keys does it produce?

RSA keys generated by crypto.subtle for RSA-OAEP with SHA-256 and public exponent 65537, exported as standard SPKI (PUBLIC KEY) and PKCS#8 (PRIVATE KEY) PEM. Outside the browser they are ordinary RSA keys that OpenSSL reads for encryption or signing.

### Can I use the keys for SSH or in production?

The private key has no passphrase and the public key is not in OpenSSH format; convert it with ssh-keygen -i -m PKCS8 -f public.pem. For long-lived production keys, generate them with ssh-keygen or OpenSSL on the machine that will use them.

### Does the private key leave my browser?

No. The pair is created and exported locally by the Web Crypto API, nothing is uploaded or stored, and the keys are gone when you close the page unless you copy them.

## Related tools

- [X.509 Certificate Decoder](https://phishdestroy.io/developer-tools/x509-decoder)
- [AES-GCM Encrypt / Decrypt](https://phishdestroy.io/developer-tools/aes-gcm-encryption)
- [Text Hash Generator](https://phishdestroy.io/developer-tools/hash-generator)
- [JWT Generator (HS256)](https://phishdestroy.io/developer-tools/jwt-generator)

All tools: https://phishdestroy.io/developer-tools
