Skip to content
Jellykit

Key Pair Generator

Generate Ed25519, ECDSA P-256/P-384 or RSA public and private key pairs as PEM, OpenSSH or JWK, without a server.

  • Runs on your device
Loading tool

About Key Pair Generator

Create a public and private key pair for signing tokens, setting up SSH, configuring a service or testing code that verifies signatures. Choose the key type, then the format: PEM (SPKI public key and PKCS #8 private key, as OpenSSL and most libraries read them), OpenSSH (an authorized_keys line and an id_* private key file) or JSON Web Key.

The keys are generated by Web Crypto in your browser and never leave this page, so the private key is known only to you. Switching the format re-writes the same key pair; press “New key pair” for a fresh one. Private keys are written without a passphrase, so store them somewhere safe.

How it works

  1. The pair is made by crypto.subtle.generateKey, the browser’s own Web Crypto implementation, and exported in raw form.
  2. PEM wraps the standard DER encodings (SPKI for the public key, unencrypted PKCS #8 for the private key) in Base64 at 64 characters a line.
  3. OpenSSH output is assembled from the key’s numbers in the SSH wire format: the public key as one authorized_keys line, the private key as an unencrypted openssh-key-v1 file, with the SHA-256 fingerprint ssh-keygen would show.
  4. JWK output removes Web Crypto’s own fields and sets kid to the key’s RFC 7638 thumbprint, so the public and private halves can be matched.

Questions

Which key type should I choose?

Ed25519 is small, fast and the modern default for SSH and signatures. ECDSA P-256 is supported almost everywhere, including JWT ES256. Choose RSA, 3072 bits or more, only when a system requires it.

Why does Ed25519 not work in my browser?

Web Crypto gained Ed25519 recently: Safari 17, Firefox 129 and Chrome 137 support it. In an older browser the tool says so; update it, or choose ECDSA or RSA.

Can I add a passphrase to the private key?

Not here. Keys are written unencrypted. To protect an OpenSSH key, run ssh-keygen -p -f on the downloaded file; for a PEM key, openssl pkcs8 -topk8 can add one.

Is an RSA 4096-bit key slow to make?

It can take a few seconds, longer on a phone, because finding large primes is random work. The page stays usable while it runs.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.