Generate an SSH key pair online

Make an Ed25519 or RSA SSH key in your browser. Get the OpenSSH public and private files, the SHA256 fingerprint and ready-to-run commands.

How it works

  1. Pick Ed25519 or an RSA size, and type a comment if you want one
  2. Copy or download the public and private key files
  3. Save the private key in ~/.ssh with chmod 600 and add the public key to the server

How to generate an SSH key online

Pick a key type and the page asks your browser's WebCrypto API for a new key pair, then writes the two files that ssh-keygen would write: a public key line for authorized_keys and an OpenSSH private key. Ed25519 is the default. An Ed25519 public key is a fixed 32 bytes, so its line is short, for example ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI followed by 43 more Base64 characters, 80 characters before the comment. RSA keys are chosen by size: a 2048-bit public key line is 372 Base64 characters long, and 3072 and 4096 are longer. Ed25519 keys need OpenSSH 6.5 or newer on the machine you connect to. If a server is older than that, use RSA 3072 or 4096.

What the files contain

The public file is one line: the algorithm name, the Base64 of the public key, and your comment. The private file is the openssh-key-v1 format, the same container ssh-keygen writes. It holds a magic string, the cipher and key-derivation names (both none here), the public key, and the private section: a 32-bit check number written twice, the key parts, the comment and padding to a multiple of 8 bytes. Lengths and big numbers use the SSH wire rules: a 4-byte length in front of each field, and RSA numbers stored as signed big-endian integers, with a zero byte added when the top bit is set. For RSA there is also a PEM (PKCS#8) option for tools that want BEGIN PRIVATE KEY. Ed25519 keys are always written in the OpenSSH format, because ssh does not read an Ed25519 PKCS#8 file.

The fingerprint

The fingerprint is what ssh-keygen -l prints: SHA256: followed by the Base64 of the SHA-256 hash of the public key blob, without the trailing = signs. It identifies the key without showing it. A known example: the Ed25519 seed made of the bytes 00 01 02 and so on up to 1f has the public key AAAAC3NzaC1lZDI1NTE5AAAAIAOhB7/zzhC+HXDdGOdLwJln5NYwm6UNXx3chmQSVTG4 and the fingerprint SHA256:lbmsoA0yIEcEiVDRnMWuzm+nV+3ZEEpVIURqFoeSspg, the same value ssh-keygen -l prints for that key. The comment is not part of the hash, so changing it does not change the fingerprint.

No passphrase, and what to do about it

This tool does not encrypt the private key. Passphrase protection needs a key-derivation step (bcrypt) that is not built in here, so the downloaded private key has no passphrase and anyone who gets the file can use it. To add one, run ssh-keygen -p -f ~/.ssh/id_ed25519 on the saved file: it asks for a new passphrase and rewrites the key. Generate keys on a device you trust, save the private file with chmod 600, do not paste it into chat or tickets, and never share it. The public key is the only part that goes to servers and services. If a key might have been seen by someone else, make a new pair and remove the old public key everywhere it was added.

Browser support and limits

Ed25519 in WebCrypto works in Chrome and Edge 137 or newer, Firefox 129 or newer and Safari 17 or newer, according to MDN's browser compatibility data. The page tests this by generating a real key, and in a browser that fails it says so and offers RSA. WebCrypto also needs a secure page (https or localhost). RSA 4096 can take a few seconds on a slow phone. Keys are made with the browser's own random number generator, in memory, and nothing is stored: close or reload the tab and the pair is gone, so download what you need first. The tool does not make ECDSA, DSA or certificate keys, and it does not add keys to any agent.

Frequently asked questions

How do I generate an SSH key for GitHub or a server?

Keep Ed25519 selected, type your email as the comment, then download id_ed25519 and id_ed25519.pub. Move the private file to ~/.ssh/id_ed25519, run chmod 600 ~/.ssh/id_ed25519, and paste the .pub line into the service's SSH keys page or the server's ~/.ssh/authorized_keys.

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

The key is made by your browser's WebCrypto code in this tab and is not uploaded or stored. The risk is the device, not the page: use a computer you trust, with no extensions you do not control. For keys that guard important servers, running ssh-keygen on your own machine writes the same file format with no browser in the path.

Should I choose Ed25519 or RSA 4096?

Ed25519 gives an 80-character public key line and a small private file, and works with OpenSSH 6.5 and newer. Choose RSA 3072 or 4096 only for a system that refuses Ed25519. RSA 2048 is listed for older systems, but a longer key gives more margin.

Why does the page say my browser cannot make Ed25519 keys?

WebCrypto added Ed25519 in Chrome and Edge 137, Firefox 129 and Safari 17. An older browser, or a page opened over plain http, fails the test. Update the browser, or pick RSA 3072, which every WebCrypto browser can make.

How do I check the fingerprint of my key?

Run ssh-keygen -lf ~/.ssh/id_ed25519.pub. It prints the size, a SHA256: fingerprint and the comment, and the fingerprint should match the one shown here, for example SHA256:lbmsoA0yIEcEiVDRnMWuzm+nV+3ZEEpVIURqFoeSspg for the test seed in the explainer.

Are my keys uploaded anywhere?

No. The text is processed in your browser and not uploaded. The key pair exists only in this tab's memory, is not written to storage or sent in any request, and disappears when you close or reload the page. Only the key type and format choices are saved in this browser, never the comment or the keys.