Skip to content
hateitall

RSA Key Generator

Make an RSA key pair in the exact PEM flavour an older library or service asks for.

Processed locallyIn: Key sizeOut: PEM (PKCS#8, SPKI, PKCS#1), JWK, OpenSSH

Loading tool…

How to use rsa key generator

  1. Choose 2048, 3072 or 4096 bits.

  2. Generate and wait for the round-trip check; 4096 bits can take a few seconds.

  3. Pick BEGIN PRIVATE KEY (PKCS#8) or BEGIN RSA PRIVATE KEY (PKCS#1), whichever your software expects.

  4. Copy or download the public and private keys.

What this tool does

  • RSA with public exponent 65537 from the browser's Web Crypto.
  • PKCS#8 and SPKI PEM, plus the older PKCS#1 RSA PRIVATE KEY and RSA PUBLIC KEY forms.
  • JWK with all CRT parameters, and OpenSSH ssh-rsa keys.

How the result is verified

The PKCS#8 key signs a random message and the SPKI key verifies it, and the OpenSSH copy is parsed back and checked the same way. Sample keys were also checked with openssl pkey -check and openssl rsa -check.

Frequently asked questions

2048, 3072 or 4096 bits?

2048 is still accepted almost everywhere. 3072 matches 128-bit security and is a good default for keys that must last years. 4096 is slower and mainly for policies that require it.

What is the difference between PKCS#8 and PKCS#1?

Both hold the same RSA key. PKCS#8 (BEGIN PRIVATE KEY) wraps it with an algorithm label and works for every key type; PKCS#1 (BEGIN RSA PRIVATE KEY) is the older RSA-only form some tools still want.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Ed25519, ECDSA and RSA keys as PEM, JWK and OpenSSH, round-trip tested

Key type→ PEM (SPKI, PKCS#8, PKCS#1)Light on device

id_ed25519 and id_rsa key pairs in OpenSSH format, ready for ~/.ssh

Key type · Comment→ OpenSSH private keyLight on device

Build and sign HS256, HS384 and HS512 tokens from your own claims

JSON claims · Secret→ JWTLight on device

Decode JWT claims, see expiry, verify HMAC and public key signatures

JWT→ HeaderLight on device