General dev

RSA Key Pair Generator

Runs locally

Use RSA Key Pair Generator

What it does

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.

It runs entirely in your browser: nothing you enter is uploaded.

Example

2048-bit key pair

Input
Keep 2048-bit in the Key size menu and press Generate Key Pair.
What the output looks like
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…
-----END PUBLIC KEY-----

-----BEGIN PRIVATE KEY-----
(2048-bit private key, generated in your browser with Web Crypto; never shown on this page)
-----END PRIVATE KEY-----

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.