Tools / RSA / ECDSA / Ed25519 Key Pair Generator

RSA / ECDSA / Ed25519 Key Pair Generator.

Generate RSA, ECDSA (P-256, P-384, P-521) and Ed25519 key pairs as PEM (PKCS#8 / SPKI) or JWK.

Runs in your browser

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Private key
Public key
Details

About RSA / ECDSA / Ed25519 Key Pair Generator

This generator creates asymmetric key pairs for signing JWTs, testing TLS and API clients, configuring OAuth providers or encrypting data. Choose Ed25519 for small, fast, modern signatures (JWS algorithm EdDSA), ECDSA on P-256, P-384 or P-521 for ES256, ES384 and ES512 tokens and most TLS setups, or RSA with 2048, 3072 or 4096 bits when a system only speaks RS256. Keys are produced by your browser's Web Crypto API, which uses the operating system's cryptographic random generator, and are exported in the formats other software expects: the private key as PKCS#8 (-----BEGIN PRIVATE KEY-----) and the public key as SubjectPublicKeyInfo (-----BEGIN PUBLIC KEY-----), both readable by OpenSSL, Node.js, PHP, Java, Go and Python. Switch to JWK to get JSON Web Keys with the correct alg, use and a kid set to the RFC 7638 thumbprint, ready to publish in a JWKS endpoint. The details panel also shows the SHA-256 of the public key, handy for key pinning. Common mistakes: committing the private key to a repository, publishing the private JWK instead of the public one (it contains the d member), using RSA keys shorter than 2048 bits, and expecting OpenSSL 1.0 or older libraries to read Ed25519 keys. Need the traditional "BEGIN RSA PRIVATE KEY" form? Convert with openssl pkey -traditional. Generation happens entirely in your browser; the page is marked sensitive, so keys are never uploaded, logged or stored in the URL.

How to Use

  1. Choose the algorithm and key size.
  2. Pick PEM or JWK output.
  3. Press Run, then copy or download the private and public keys and store the private key safely.

Frequently Asked Questions

Which algorithm should I choose?

Ed25519 for new systems that support it, ECDSA P-256 for broad compatibility (ES256, TLS), and RSA 2048 or 3072 only when a system requires RSA.

Are browser-generated keys secure?

Yes. Web Crypto generates keys with the operating system's cryptographically secure random number generator, the same source OpenSSL uses.

How do I convert the key to another format?

OpenSSL reads both PEM files directly; for example openssl pkey -in private.pem -traditional writes the legacy RSA or EC private key format, and the JWK output can be pasted into most JOSE libraries.

Is the private key sent to your server?

No. Keys are generated in your browser and never uploaded, logged or stored in the URL. Close the tab when you have saved them.

Related Tools