ECDSA Key Pair Generator
Generate an ECDSA key pair on P-256, P-384 or P-521 as PEM or JWK. Free, and runs entirely in your browser — nothing you enter is uploaded or stored.
About Key Pair Generator
A key pair is two numbers that belong together: one you publish and one you must never show anyone. That second requirement is why a generator has to run locally. Any site that posts a form and returns a private key has, by construction, held that key — and there is no way to audit that it forgot. This one calls crypto.subtle.generateKey, so the key is produced inside the browser's own cryptographic implementation and the bytes are never sent anywhere.
The choice between RSA and a curve is mostly settled. RSA is still everywhere because TLS and JWT have carried it for thirty years, but it buys strength slowly — a 2048-bit RSA key is worth about 112 bits of security, and doubling it to 4096 adds roughly sixteen more while costing several times as much to use. A P-256 key is worth about 128 bits in a key a fraction of the size, and Ed25519 gives the same strength in 32 bytes with none of RSA's sharp edges around padding. Pick a curve unless something you have to interoperate with insists on RSA.
Where it helps
- The private key is generated in this tab by the browser's own implementation and is never transmitted.
- Exports both PEM (PKCS#8 and SPKI) and JWK, which covers nearly everything that consumes a key.
- Reports the real security level rather than the key size, which for RSA are very different numbers.
- Computes the RFC 7638 thumbprint, the canonical identifier for a key.
Limits
- A key generated in a browser tab has been in a page, a clipboard and possibly a scroll buffer — treat anything from here as a test key unless you are certain of the machine.
- Only what Web Crypto implements is available: no OpenSSH format, no PGP, no passphrase-encrypted private keys.
- Ed25519 and X25519 depend on the browser having shipped them, and older engines have not.
- Generating a 4096-bit RSA key takes a noticeable moment, because it has to search for primes.
Frequently asked questions
Is this safe to use for a real key?
The generation is: it uses the same primitive a server-side library would. The risk is everything around it — the browser, any extension with page access, and wherever you paste the result. For production keys, generate on the machine that will hold them.
RSA or elliptic curve?
A curve, unless you have to interoperate with something that only speaks RSA. P-256 is universally supported; Ed25519 is better still where it is available.
Why is 4096-bit RSA only a little stronger than 2048?
Because the attacks on RSA do not scale with the key length. By NIST's own estimates 2048 bits is worth about 112 bits of security and 3072 about 128 — you double the key to gain roughly sixteen bits.
What is the difference between PKCS#8 and SPKI?
PKCS#8 is the private key — the PEM beginning BEGIN PRIVATE KEY. SPKI is the public half — BEGIN PUBLIC KEY. Only ever share the second.
Related tools
- JWT — Read, verify and sign JSON Web Tokens
- CSR Generator — Generate a key pair and certificate signing request locally
- Certificate Viewer — Decode a PEM certificate or CSR in the browser
- Hash Generator — SHA-2, SHA-3, BLAKE and legacy digests, in any encoding
- MD5 Generator — MD5 digests, with a plain account of what they are still good for
- HMAC Generator — Keyed message authentication codes
More Security & Cryptography tools
- Hash Generator — SHA-2, SHA-3, BLAKE and legacy digests, in any encoding
- MD5 Generator — MD5 digests, with a plain account of what they are still good for
- HMAC Generator — Keyed message authentication codes
- Key Derivation — Stretch a passphrase into key material with PBKDF2, scrypt or Argon2id
- Password Generator — Strong random passwords with an entropy estimate
- Password Strength — Judge a password by what an attacker would actually try
- JWK Generator — A JSON Web Key for a JOSE algorithm, with its key set and thumbprint id
- Key Pair Generator — RSA and elliptic-curve key pairs, generated in this tab and never sent
- TOTP / HOTP Generator — Two-factor codes, the QR code to enrol with, and why one did not match
- Text Encryption — AES-256-GCM with a PBKDF2 passphrase
- Bcrypt Generator — Hash a password with bcrypt, verify one against a hash, or read what a hash is made of