How to use the ssh key fingerprint calculator
- Copy your public key from
~/.ssh/id_ed25519.pubor~/.ssh/id_rsa.pub. - Paste the entire single line into the text area above.
- The tool automatically extracts the base64 blob and computes both the MD5 and SHA256 ssh key fingerprint values.
- Compare the displayed fingerprint against the one shown by your server or
ssh-keygen -lf.
How an SSH key fingerprint is computed
An ssh key fingerprint is not derived from the whole text line you paste. The parser splits the line on whitespace into three parts: the key type (such as ssh-rsa or ssh-ed25519), the base64-encoded key blob, and an optional comment. Only the decoded binary blob is hashed.
For the MD5 fingerprint, the raw bytes are passed through the MD5 algorithm and the resulting 16-byte digest is formatted as lowercase hexadecimal pairs separated by colons, for example d4:1d:8c:d9:8f:00:b2:04:e9:80:09:98:ec:f8:42:7e.
For the SHA256 fingerprint, the same binary blob is hashed with SHA-256. The 32-byte digest is then encoded in base64 (standard alphabet) and any trailing = padding characters are stripped. OpenSSH prefixes this string with SHA256:. This is the default format since OpenSSH 6.8.
Verifying a host key fingerprint
When you connect to a new server via SSH, the client displays the server's host key fingerprint and asks you to confirm it. This prevents man-in-the-middle attacks where an attacker impersonates the server. You should compare the fingerprint shown in your terminal against a trusted source, such as a cloud provider's dashboard or a message from the system administrator.
You can also verify a local file using the command line. Running ssh-keygen -lf ~/.ssh/id_ed25519.pub prints the bit length, the SHA256 fingerprint, the comment, and the key type in parentheses. To see the legacy MD5 format instead, add -E md5: ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub.
Supported key types
This calculator handles all standard SSH public key formats that use the single-line base64 structure. The most common types include:
| Key type prefix | Algorithm |
|---|---|
ssh-rsa | RSA |
ssh-ed25519 | Ed25519 (EdDSA) |
ecdsa-sha2-nistp256 | ECDSA on NIST P-256 |
ecdsa-sha2-nistp384 | ECDSA on NIST P-384 |
ecdsa-sha2-nistp521 | ECDSA on NIST P-521 |
sk-ssh-ed25519@openssh.com | FIDO/U2F Ed25519 |
sk-ecdsa-sha2-nistp256@openssh.com | FIDO/U2F ECDSA |
Certificate lines ending in -cert-v01@openssh.com (ed25519, RSA and ECDSA) are supported too. For these, ssh-keygen -l reports the fingerprint of the public key inside the certificate, and so does this tool. The tool also checks that the key type in the text matches the type inside the key data and shows the key size in bits.
MD5 versus SHA256 fingerprints
Older versions of OpenSSH displayed MD5 fingerprints by default. Because MD5 is cryptographically broken for collision resistance, OpenSSH 6.8 (released in 2015) switched the default to SHA256. While an ssh key fingerprint based on MD5 is still useful for quick visual comparison, you should rely on SHA256 for security-sensitive verification.
Some legacy systems, older documentation, or third-party control panels may still show MD5. This tool provides both formats simultaneously so you can match whichever your environment expects without running multiple commands.
Common mistakes when checking fingerprints
A frequent error is hashing the entire text line including the ssh-rsa prefix and the trailing comment. The fingerprint must be computed only on the decoded base64 bytes. If you pass the whole string to a generic hash tool like the hash generator, the result will not match what ssh-keygen outputs.
Another issue is confusing the private key with the public key. Fingerprints are always derived from the public key. If you accidentally paste the contents of id_rsa instead of id_rsa.pub, the parser will reject it because it lacks the expected type prefix and base64 structure.
Finally, ensure you are comparing the right key. A server has its own host keys, while users have authentication keys. Their fingerprints serve different purposes and should not be mixed up.
Worked examples
| Example | Input | Result |
|---|---|---|
| Ed25519 key | SSH public key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPZEXoCegvvsSXkr537TcQ+MX6l1DJswLWYPvRlqWL4c user@example.com | SHA256 fingerprint: SHA256:GRiOhSM78NaW7w0mhDr/cTiIq3BDrb0tG/VlcboxWLU; MD5 fingerprint: MD5:d7:89:60:5e:c4:b1:82:37:35:fa:05:0c:5f:79:db:8d; Key type: ssh-ed25519; Comment: user@example.com; Key size: 256 bits; Key data length: 51 bytes |
| RSA 2048-bit key | SSH public key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDO8REpXpMIlzGaWMbeKZFP6PPr8R4/C40ZaGrp03PXNsxJzJQ4lEj2pDCB3nNwQQejgUwnqA9O+QiLLKCtmycj+XC27smQVRLhb6XmqjhW8QCWs7b03lffsPTeqyIE7ugCMQ542ShsHaCYcYIOSkNJweGOq1hQXO0YSah+Gxn4ATxhFUXXKUmZDdLNK25T2KrcNqruiAdAbnVAxUSp2tHhlmE+sr/axwMVuOQy2fYi8DDf5qOclJL1AwWG9W74WqKg7hvucn5fRHhgwKbXzGm82P58472LB9eY066eSd4cvJz7105W8N6jn4wBhXvzot+w8qulNTVCyRUqH1GYFHbX deploy@example.com | SHA256 fingerprint: SHA256:10fVS4IHJR7nRUs+zNSHafGKOrcmUiRrWx+jZ9iS35A; MD5 fingerprint: MD5:eb:b1:d7:eb:7f:e8:32:7d:4a:2d:77:7b:3c:58:e0:f9; Key type: ssh-rsa; Comment: deploy@example.com; Key size: 2048 bits; Key data length: 279 bytes |
| ECDSA P-256 key | SSH public key: ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDNtUd169xB1PV9oMhvwWEqtVZjPqYOyO1Muj7CevrFUB4k0Heduqzz//rB9Hp3m3B6rbA3o5bC7+MTXw9FNq8E= laptop | SHA256 fingerprint: SHA256:JEyyQVkjhhx3+0xkE8491n0H/l/8M5jdTl5u1q4tIxY; MD5 fingerprint: MD5:4b:95:d2:70:18:5e:a1:b3:09:a1:18:02:a4:9d:41:4e; Key type: ecdsa-sha2-nistp256; Comment: laptop; Key size: 256 bits; Key data length: 104 bytes |
FAQ
What is an SSH key fingerprint?
An ssh key fingerprint is a short hash derived from the binary data of a public key. It allows humans and software to quickly identify and verify a key without comparing the full base64 string.
Why do I get a different hash if I use a regular hash tool?
Standard hash tools process the exact text you provide. An SSH fingerprint is computed only on the decoded base64 payload, excluding the key type prefix and the comment at the end of the line.
Is it safe to paste my public key here?
Yes. Public keys are meant to be shared, and this tool processes everything locally in your browser. Nothing is sent to any server.
Which fingerprint format should I use, MD5 or SHA256?
Use SHA256 unless you are working with a legacy system that specifically requires MD5. OpenSSH has defaulted to SHA256 since version 6.8.
Can I check a private key fingerprint with this tool?
No. This tool only accepts public key lines starting with a type identifier like ssh-rsa or ssh-ed25519. Extract the public key first using ssh-keygen -y -f your_private_key.
Does this support ed25519 and ECDSA keys?
Yes. Any valid SSH public key format that uses a type prefix followed by a base64 blob is supported, including ssh-ed25519, ecdsa-sha2-nistp256, and FIDO security key variants.