RSA Key Pair Generator
Generate an RSA public/private key pair in PEM format, instantly inside your browser.
What is an RSA key pair?
RSA is a widely used public-key (asymmetric) cryptography algorithm built on two mathematically linked keys: a public key that can be shared freely, and a private key that must be kept secret. Together they enable digital signatures and secure key exchange without ever needing to share a secret over an insecure channel.
This tool generates a fresh RSA key pair using the browser's native Web Crypto API and exports both keys in standard PEM format, ready to use in other tools and systems.
GuideHow to use it
How the key pair is generated
The browser's Web Crypto API generates a mathematically valid RSA key pair natively, using a cryptographically secure random source. Each key is then exported in its standard binary format — SPKI for the public key, PKCS8 for the private key — and Base64-encoded with PEM headers, the same format used by OpenSSL and most other cryptography tools.
Why it helpsFeatures & benefits
Why this runs entirely in your browser
A private key must never be exposed to a third party, so the entire key pair is generated locally using the Web Crypto API, and nothing is ever transmitted to a server.
Common uses
Generating a test key pair for local development, creating keys for signing and verifying data, or learning how public-key cryptography and PEM formatting work.
Frequently asked questions
A few things people usually want to know before trusting the numbers.
2048-bit is the widely accepted minimum for RSA today. 3072 or 4096-bit offers a larger security margin at the cost of slower generation and larger key sizes.
They're mathematically valid RSA keys, but since they're generated in a browser tab and displayed on screen, treat them as suitable for testing and development rather than storing real production secrets.
The public key can be shared with anyone and is used to verify a signature or encrypt data meant only for you. The private key must be kept secret — it's used to create signatures or decrypt data.
PEM is the standard text-based format for sharing cryptographic keys — Base64-encoded binary data wrapped in readable header and footer lines, widely supported by OpenSSL and most cryptography libraries.
No. Key generation happens entirely in your browser using the Web Crypto API. Nothing generated here is sent to a server, stored, or shared.