RSA Key Pair Generator
Generate RSA 2048/3072/4096-bit public and private key pairs entirely in your browser via the Web Crypto API.
Loading tool...
What is RSA Key Pair Generator?
An RSA key pair generator creates a public and a private cryptographic key using the RSA algorithm. The public key can be shared openly to verify signatures or encrypt data, while the private key stays secret to sign or decrypt. This tool generates keys entirely in your browser via the Web Crypto API.
Key Benefits
- Keys never leave your device
- Standards-compliant PEM and Base64 output
- Multiple key strengths (2048/3072/4096)
- No install, no signup, no server round-trip
Common Use Cases
- β’JWT RS256 signing keys
- β’SSL/TLS certificate signing requests (CSRs)
- β’API authentication and mTLS setup
- β’Learning and prototyping public-key cryptography
How to Generate an RSA Key Pair
- Pick a key size: Choose 2048, 3072, or 4096 bits.
- Click Generate: The Web Crypto API creates the key pair locally.
- Copy or download: Grab the PEM or Base64 for public and private keys.
- Use securely: Store the private key safely and never expose it client-side.
Key Features
- Generate RSA 2048/3072/4096-bit keys
- 100% in-browser via Web Crypto API
- Export PEM (PKCS#8 & SPKI)
- Copy or download public/private keys
- Base64 (DER) output for compact formats
- No server, no upload, fully private
Frequently Asked Questions
Are the generated keys secure?
Yes. Keys are produced by the browser-native Web Crypto API using a CSPRNG, the same source OpenSSL and other tools rely on. Generation happens entirely on your device; nothing is transmitted.
What key size should I choose?
2048 bits is the current minimum for general use and is fast. 3072 offers a security margin comparable to 128-bit symmetric. 4096 is for long-term or high-value keys but is slower to generate and use.
What format are the keys in?
Public keys use SPKI (SubjectPublicKeyInfo) and private keys use PKCS#8, both PEM-armored. Base64 (DER) output is also provided for compact, single-line formats.
Can I use these keys for SSH or JWT RS256?
The PEM output is compatible with JWT RS256 signing and most PKI tooling. For SSH, additional OpenSSH-specific formatting is required, so convert with ssh-keygen or similar tools.
Featured in Collections:Cryptography & Web Security Hardening