SSH Key Pair Generator

Generates a modern Ed25519 key pair entirely in your browser using the native WebCrypto API. The private key is never transmitted anywhere — it exists only on this page until you copy it.

Usually your email or user@host — helps identify the key later.
Click "Generate key pair" to create a new Ed25519 key. Nothing happens until you do — no key is pre-generated or cached.

What gets generated

This tool creates an Ed25519 key pair, the elliptic-curve algorithm OpenSSH has recommended as the default since it was introduced. Compared to RSA, Ed25519 keys are far shorter (a public key is about 68 characters versus several hundred for RSA), generate almost instantly, and are considered at least as secure as a 3072-bit RSA key.

Generation happens through the browser's built-in WebCrypto API — the same class of cryptographic primitives your operating system itself relies on. The only custom code here is formatting that key material into the standard OpenSSH file format, since browsers don't have a built-in "export as OpenSSH key" function. That formatting logic has been tested against real key pairs to confirm the output round-trips correctly and produces a cryptographically valid, working key — not just something that looks like one.

What to do with the two outputs

Save the private key block exactly as shown into a file — conventionally named id_ed25519 — and restrict its permissions immediately: chmod 600 id_ed25519 on Linux or macOS. Anyone who can read that file can authenticate as you, so treat it the same way you'd treat a password.

The public key line is safe to share. Append it to the ~/.ssh/authorized_keys file on any server you want this key to grant access to, one line per key.

Frequently asked questions

Why Ed25519 instead of RSA?

Shorter, faster to generate, and considered at least as secure as a 3072-bit RSA key — OpenSSH has recommended it as the default for years.

Is it safe to generate an SSH key in a browser?

Yes, when generated client-side via WebCrypto as this tool does. Nothing is sent to a server — the private key exists only in your browser until you copy or save it.

What do I do with the two keys this generates?

Save the private key to a file with restricted permissions (chmod 600) and keep it secret. Add the public key line to ~/.ssh/authorized_keys on any server you want to access.