Skip to main content

RSA Key Generator & Signature Tool

Generate RSA key pairs, sign messages with a private key, verify signatures — all client-side

Generate RSA key pair

Keys are generated in your browser via the Web Crypto API and never transmitted. 2048 bits is the practical minimum today; use 3072+ for long-lived keys.

Public key (PEM)

Private key (PEM)

About the RSA Key Pair Generator

RSA keys still secure a huge share of TLS, JWT RS256 signing, SSH authentication, and code signing. But generating a pair is only half the workflow — developers also need to sign a message with the private key and check a signature against a public key, usually while debugging an RS256 token, a webhook payload, or an SSO assertion.

This tool does all three in your browser via the Web Crypto API: generate 2048–4096 bit key pairs as PEM, sign any message with a private key (RSASSA-PKCS1-v1_5 or RSA-PSS, SHA-256/384/512), and verify Base64 or hex signatures against a public key. Keys, messages, and signatures never touch a server — for production key material, use a managed key store.

How to use

  1. Generate: pick a key size and click Generate Key Pair — PEM blocks appear for both keys.
  2. Sign: paste a private key (PKCS#8 or traditional RSA PEM) plus your message, choose scheme and hash.
  3. Copy the Base64 or hex signature and hand the public key to the receiving side.
  4. Verify: paste the public key, the exact message, and the signature — valid/invalid is shown instantly.

Frequently Asked Questions

Should I use these keys in production? ▾

No — for production, use a managed key service (AWS KMS, Google Cloud KMS, Azure Key Vault) or generate keys on an air-gapped machine. Browser-generated keys are for testing and development only.

2048 or 4096 bits? ▾

2048 bits is sufficient for most purposes and is the NIST minimum through 2030. 4096 bits provides extra margin but is slower to use. For JWT signing, 2048 is the standard.

How do I sign a message with an RSA private key? ▾

Paste a PEM private key (PKCS#8 -----BEGIN PRIVATE KEY----- or traditional -----BEGIN RSA PRIVATE KEY-----) and your message into the Sign tab, pick a scheme and hash, and the signature is produced in your browser via the Web Crypto API. RSASSA-PKCS1-v1_5 with SHA-256 is what JWT RS256 and most APIs expect; RSA-PSS is the modern scheme with provable security — use it when the receiving side supports it.

Can I verify an RSA signature online? ▾

Yes — the Verify tab checks a Base64 or hex signature against a PEM public key and the exact message, entirely client-side. The message must be byte-identical to what was signed, and the scheme and hash must match the signer settings. A common failure is verifying PKCS1-v1_5 output with the PSS scheme selected, or trailing whitespace differences in the message.

RSASSA-PKCS1-v1_5 or RSA-PSS — which should I use? ▾

PKCS1-v1_5 is ubiquitous: TLS certificates, JWT RS256, and most legacy APIs use it, and despite no formal proof of security in the generic model it remains safe when implemented with correct padding checks (browsers do this for you). PSS includes a random salt, making forgery provably as hard as RSA inversion, and it is required in newer specifications. New designs that can choose should default to PSS with SHA-256 and a 32-byte salt — exactly what this tool uses.