Hash identification

What a digest tells you about itself, which is less than people expect, and what the answer means once you have it.

A good hash function produces output indistinguishable from random. That is the point, and it is also why identifying one is so limited: the digest carries no version byte, no algorithm marker, nothing. All you get is the length — and every algorithm with the same output size produces output that looks exactly alike.

So identification narrows the field and stops. What settles it is context: the column it came out of, the config file next to it, the library the application imports.

Paste a hash into the decoder →

By length

Hex charsBytesCandidatesNotes
3216MD5, MD4, NTLM, LMNTLM is unsalted MD4 of the UTF-16LE password. LM appears as two 16-character halves.
4020SHA-1, RIPEMD-160MySQL 4.1+ writes SHA-1 with a leading *.
5628SHA-224, SHA3-224Uncommon in the wild.
6432SHA-256, SHA3-256, BLAKE2s-256The default general-purpose digest today.
9648SHA-384, SHA3-384Turns up in SRI attributes and TLS suites.
12864SHA-512, SHA3-512, BLAKE2b-512, WhirlpoolSHA-512 is faster than SHA-256 on 64-bit hardware.

Base64 changes the arithmetic but not the principle: a 32-byte digest is 44 base64 characters ending in =. Subresource Integrity writes them that way — sha384-… — with the algorithm named in front, which is the sensible thing to do. See the SRI generator.

Formats that name themselves

Password hashes are different, because a password hash has to store its own parameters — the salt and the cost — or it could never be verified again. Modular crypt format puts all of it in one string:

PrefixAlgorithmVerdict
$argon2id$Argon2idFirst choice. Memory-hard; parameters (m=, t=, p=) are in the string.
$2a$ $2b$ $2y$bcryptGood. The two digits after are the cost — $2b$12$ is 2¹² rounds. 12 is the current floor.
$7$, $scrypt$scryptGood, if the parameters are.
$y$, $gy$yescryptGood. The current /etc/shadow default on Debian and Fedora.
$6$ / $5$sha512crypt / sha256cryptAcceptable, ageing. Salted and iterated, but not memory-hard — far cheaper on a GPU than bcrypt.
$1$md5cryptObsolete. Rehash on next login.
{SSHA}, {SHA}LDAPA single unstretched digest, salted at best. Not a password hash in any modern sense.

If you have found a bare digest in a password column

A 32- or 40-character hex string where a password hash should be is a finding on its own, whether or not it is salted. MD5 and SHA-1 are fast — that is what they were built for — and commodity hardware clears billions of candidates a second against them. Salting stops precomputed tables; it does nothing about the speed, so every password in the list still falls, just individually.

The migration does not require knowing anyone's password:

For the algorithms and parameters themselves, cryptoguides.fyi has working password-hashing recipes in seven languages.

What identification cannot do

Open the decoder →