b2KIT

SSH Key Fingerprint Calculator

Calculate the fingerprint of an SSH public key in MD5 and SHA-256 formats for verification.

Tested tool guide Tested browser tools Checked August 16, 2026

What SSH Key Fingerprint Calculator does and how it behaves

The fingerprint is a short digest of a public key that two people can compare over a separate channel to confirm they hold the same key. Paste an SSH public key and this tool returns both fingerprints you will meet in the wild: the legacy MD5 form as colon-separated hex and the modern SHA-256 form as a SHA256: base64 string, the same value ssh-keygen -lf prints. The one thing that trips people up: the digest is computed over the decoded binary key data, not over the base64 text, so hashing the pasted characters yourself gives a different number.

How the result is produced

1

The key blob

SSH public keys are stored in a wire format: a length-prefixed algorithm name such as ssh-ed25519 or ssh-rsa, then length-prefixed fields holding the key material, the modulus and exponent for RSA, the curve name and point for ECDSA, a 32-byte value for Ed25519. The tool base64-decodes the pasted key and hashes that binary blob, so the same key yields the same fingerprints from any file that holds it.

2

Two digests, one key

The MD5 fingerprint is 16 bytes written as colon-separated hex, the default ssh-keygen output before OpenSSH 6.8 and still available with -E md5. The SHA-256 fingerprint is a base64 digest shown with the SHA256: prefix, the default since 6.8. Both are digests of the same blob, so they always agree on whether two keys match, and neither contains any recoverable part of the key.

Good uses

  • First SSH connection to a server: compare the fingerprint the client displays with the value the operator publishes on their website or helpdesk, instead of accepting the unknown-host prompt on faith.
  • After uploading a key to GitHub, GitLab, or a cloud provider, confirm the fingerprint they show for the registered key matches your local .pub file, catching a typo or the wrong file.
  • Audit a machine: identify which authorized_keys entry a given key corresponds to, or confirm that a server's host key silently changed, by fingerprinting the candidates and comparing.

Limits and checks

  • A fingerprint identifies the public key, not its holder: anyone who sees a public key can compute the fingerprint, and you cannot read the key or its private half out of it. It only proves two parties hold the same public key, not that either owns it.
  • The two formats are different digests rendered differently: an MD5 hex string never equals a SHA256: base64 string, even for the same key. A host may also present several keys (Ed25519, RSA, ECDSA), each with its own fingerprint, so a mismatch may just mean the wrong key type was compared.
  • MD5 is cryptographically broken for collision attacks, so when verifying against an untrusted party or over an insecure channel, treat the SHA-256 value as the authoritative one and compare it over a channel you trust.

Common questions

Why does the fingerprint differ from what ssh-keygen prints for my key?

Most likely a format or key mismatch. ssh-keygen -lf prints the SHA256: form by default; add -E md5 for the colon-separated hex. Confirm you pasted the same key file you fingerprinted locally, and that both sides show the same key type, since a host often has several keys with different fingerprints.

Is it safe to publish my key's fingerprint?

Yes. The fingerprint is a one-way digest of a public key that is already public; publishing it reveals nothing about the private key and cannot be reversed into key material. That is exactly what server operators do when they publish host key fingerprints, and what makes out-of-band comparison a useful check.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools