Free SSH Key Pair Generator

Generate RSA SSH key pairs (2048 or 4096-bit) in your browser using the Web Crypto API. Produces a private key (PEM format), public key (OpenSSH authorized_keys format), and SHA-256 fingerprint.

Updated

Share:
Home/Utility Tools/SSH Key Pair Generator

SSH Key Pair Generator

Generate RSA SSH key pairs in your browser using the Web Crypto API. Produces private key (PEM), public key (OpenSSH authorized_keys format), and SHA-256 fingerprint.

Key Generation Settings

Appended to the public key for identification.

Keys are generated entirely in your browser using the Web Crypto API (SubtleCrypto). Nothing is transmitted to any server. Your private key never leaves your device.

Frequently Asked Questions

What is the SSH Key Pair Generator?

The SSH Key Pair Generator is a free online tool that generate rsa ssh key pairs (2048 or 4096-bit) in your browser using the web crypto api. produces a private key (pem format), public key (openssh authorized_keys format), and sha-256 fingerprint.. It runs entirely in your browser with no installation or sign-up needed.

Are the keys generated securely?

Yes — keys are generated using SubtleCrypto (Web Crypto API) in your browser. Nothing is sent to any server. Your private key never leaves your device.

What format is the public key in?

The public key is in OpenSSH authorized_keys format (ssh-rsa AAAA... comment), compatible with GitHub, GitLab, server ~/.ssh/authorized_keys, and ssh-copy-id.

What format is the private key in?

The private key is exported in PKCS#8 DER format wrapped in a PEM block (RSA PRIVATE KEY header), compatible with standard SSH clients.

Is it free?

Yes, completely free.

Is my data safe with this tool?

Absolutely. The SSH Key Pair Generator processes everything client-side in your browser. No data is uploaded to or stored on any server. Your content remains private on your device at all times.

Does the SSH Key Pair Generator work on mobile devices?

Yes, the SSH Key Pair Generator is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.

Do I need to create an account to use this tool?

No account or registration is needed. Simply open the SSH Key Pair Generator in your browser and start using it immediately. There are no sign-up walls or usage restrictions.

How do I use the SSH Key Pair Generator?

Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.

Which browsers are supported?

The SSH Key Pair Generator works in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. For the best experience, use the latest version of your preferred browser.

Should I generate a 2048-bit or 4096-bit SSH key?

For most situations, choose 4096-bit. The larger RSA modulus gives a wider security margin and is what current guidance recommends for long-lived keys you'll keep for years, such as your main GitHub or server login key. A 2048-bit key is the practical minimum still considered safe today; it generates a little faster and is perfectly fine for shorter-lived or lower-risk keys, like a throwaway key for a test server you'll delete next week. The trade-off is small: 4096-bit keys take marginally longer to create and authenticate but are otherwise indistinguishable in daily use. There is no benefit to going below 2048 bits, which is now considered weak. This generator offers both sizes from a dropdown, defaulting to 4096-bit — pick your size, click generate, and the key pair appears instantly.

What does the comment field do on an SSH key, and do I need one?

The comment is an optional label appended to the end of the public key line, producing output like "ssh-rsa AAAA... user@hostname". It has zero effect on the cryptography — the key works identically with or without it. Its only job is human identification: when several public keys are stacked in one server's authorized_keys file, the comment tells you at a glance which key belongs to which person or machine, so you can revoke the right one later. Common conventions are user@hostname or your email address, but any short text works. If you leave the field blank, the tool simply omits it and the key is still completely valid. Add a comment in the optional field before generating to make your key easy to recognize, or skip it for a bare key.

What is the SHA-256 fingerprint and how do I use it to verify a key?

The fingerprint is a short SHA-256 digest of the public key, shown as a string like "SHA256:abc123...". Because any change to the key produces a completely different fingerprint, it acts as a compact, human-comparable summary of the full key. You use it to confirm two parties are looking at the same key without reading out hundreds of characters: read the fingerprint aloud over the phone, compare it to what a server reports, or check it against the value GitHub displays for an added key. SSH itself shows fingerprints when you first connect to a host so you can catch tampering. The fingerprint is safe to share publicly — it cannot be reversed back into the key. This tool computes the SHA-256 fingerprint automatically and gives you a one-click copy button beside it.

How do I add the generated public key to GitHub or GitLab?

Use only the public key — never paste the private key into a website. After generating, click Copy on the Public Key card to grab the full "ssh-rsa AAAA..." line. On GitHub, go to Settings, then SSH and GPG keys, click New SSH key, paste the line into the Key box, give it a title, and save. GitLab and Bitbucket follow the same pattern under their SSH Keys settings. Then test the connection from your terminal with "ssh -T git@github.com". Keep the matching private key safe on your own machine at ~/.ssh/id_rsa with permissions locked to chmod 600, since it is the secret half that proves your identity. The output produced here is in standard OpenSSH authorized_keys format, so it pastes directly into any of these services without conversion. Generate your pair and copy just the public line to get connected.

What is the difference between RSA and Ed25519 SSH keys?

RSA and Ed25519 are two different algorithms for SSH key pairs. RSA is the long-established, universally compatible choice and works with essentially every SSH server and Git host, which is why a 4096-bit RSA key remains a safe, widely accepted default. Ed25519 is a newer elliptic-curve algorithm that produces much shorter keys with comparable or better security and slightly faster operations, but it requires reasonably modern OpenSSH and isn't accepted by some older systems. If you need maximum compatibility or are working with legacy servers, RSA is the dependable pick; if every system in your stack is current, Ed25519 is an excellent modern alternative. This tool generates RSA key pairs in 2048-bit or 4096-bit sizes using your browser's Web Crypto API — select a size and generate a fully OpenSSH-compatible pair in seconds.

Embed This Tool

Add a free, live version of this widget to your own website or blog post — it runs entirely in your visitors' browsers, with a credit link back to The Toolbox.

Copy & paste this HTML
<iframe src="https://getthetoolbox.com/embed/ssh-keygen" title="Free SSH Key Pair Generator — The Toolbox" width="100%" height="320" style="max-width:480px;border:1px solid #e2e8f0;border-radius:12px" loading="lazy"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://getthetoolbox.com/utility-tools/ssh-keygen?utm_source=embed&utm_medium=widget" target="_blank" rel="noopener">Free SSH Key Pair Generator</a> by The Toolbox</p>

About the SSH Key Pair Generator

The SSH Key Pair Generator is a free tool that creates an RSA key pair right in your browser. Pick a key size, add an optional comment, and click generate — it returns a private key in PEM format, a matching public key in OpenSSH authorized_keys format, and a SHA-256 fingerprint. SSH keys are how you log in to remote servers and push to GitHub, GitLab, or Bitbucket without typing a password, so this tool is aimed at developers, sysadmins, and anyone who needs a key pair but would rather not open a terminal to run ssh-keygen by hand.

Everything happens locally using the Web Crypto API (SubtleCrypto), the same cryptographic engine built into modern browsers. Your keys are generated on your own device and nothing is sent to a server, so the private key never leaves your machine. There is no sign-up, no account, and nothing to install.

What the generator produces

  • Private key — exported in PKCS#8 DER and wrapped in a PEM block (-----BEGIN RSA PRIVATE KEY-----). This is the secret half of the pair. Anyone who holds it can authenticate as you, so it must stay private.
  • Public key — formatted as a single OpenSSH line (ssh-rsa AAAA... comment), exactly the format that GitHub, GitLab, ~/.ssh/authorized_keys, and ssh-copy-id expect. It is safe to share.
  • SHA-256 fingerprint — a short SHA256:... digest of the public key you can read aloud or compare to confirm two parties are looking at the same key.

You can copy any of the three to your clipboard or download the key files directly as id_rsa (private) and id_rsa.pub (public).

Choosing a key size

The tool offers two RSA modulus sizes:

  • 4096-bit — the recommended default. The larger modulus gives a wider security margin and is what most security guidance suggests for long-lived keys.
  • 2048-bit — the practical minimum still considered safe today. It generates faster and is fine where a shorter-lived or lower-risk key is acceptable.

The optional comment is appended to the end of the public key. A label like user@hostname or you@email.com makes a key easy to identify later when several appear in one authorized_keys file — it has no effect on the cryptography.

Putting the keys to use

Once generated, the workflow is the same as keys made with the command-line ssh-keygen:

  1. Save the private key to ~/.ssh/id_rsa and lock down its permissions with chmod 600 ~/.ssh/id_rsa. SSH refuses to use a private key that is readable by other users.
  2. Install the public key on the server, either with ssh-copy-id -i ~/.ssh/id_rsa.pub user@host or by appending it to the remote ~/.ssh/authorized_keys file.
  3. Connect with ssh -i ~/.ssh/id_rsa user@host — no password needed.

For Git hosting, paste the public key into Settings → SSH Keys → Add new key on GitHub, GitLab, or Bitbucket. The tool includes these exact commands on the page after you generate a pair.

Why generate keys in the browser

Key-based authentication is stronger than passwords: a 4096-bit RSA key is effectively impossible to brute-force, and because the private half is never sent over the network, there is no password for an attacker to phish or intercept. Generating the pair client-side keeps that security promise intact — the private key is created in your browser's memory and only saved where you choose to put it.

A practical note on trust: for the most security-sensitive keys, many people still prefer to run ssh-keygen on a machine they fully control. This generator is ideal for quick setups, test environments, throwaway servers, and any time a terminal is not convenient — and it produces standard, fully compatible OpenSSH keys either way.