Hash identifier
Paste a digest you do not recognise and see the algorithms that could have produced it. Identification is by format and length, which narrows the field but cannot prove anything on its own.
Nothing is submitted
What length tells you
Every digest algorithm has a fixed output size, and hexadecimal encodes four bits per character. So the number of characters is a strong hint, even though it is never proof.
| Characters | Bits | Likely candidates |
|---|---|---|
| 8 | 32 | CRC-32 |
| 16 | 64 | CRC-64, FNV-1a 64 |
| 32 | 128 | MD5, MD4, NTLM, LM |
| 40 | 160 | SHA-1, RIPEMD-160 |
| 56 | 224 | SHA-224, SHA3-224 |
| 64 | 256 | SHA-256, SHA3-256, BLAKE2s-256, Keccak-256 |
| 96 | 384 | SHA-384, SHA3-384 |
| 128 | 512 | SHA-512, SHA3-512, Whirlpool, BLAKE2b-512 |
The ambiguity is real. A 32-character hex string is the output of MD5, but also of MD4, of the NTLM hash Windows stores for a password, and of the obsolete LM hash. Nothing in the string distinguishes them, because they are all 128 bits rendered the same way. The full table with Base64 equivalents is in the hash length reference.
What the prefix tells you
Password hashes made by crypt(3) and its descendants are self-describing: they
start with a marker that names the algorithm, then the salt, then the digest.
| Prefix | Format | Status |
|---|---|---|
$1$ | md5crypt | Broken, do not use |
$2a$ $2b$ $2y$ | bcrypt | Acceptable, cost 12 or higher |
$5$ | sha256crypt | Weak, iteration count too low |
$6$ | sha512crypt | Weak for the same reason |
$argon2id$ | Argon2id | Current recommendation |
$pbkdf2-sha256$ | PBKDF2 | Acceptable with a high iteration count |
When a hash carries a prefix, the answer is not a guess. When it does not, the honest answer is a shortlist.
Hex or Base64?
Base64 uses 64 characters including upper and lower case, so a Base64 digest of the same bytes
is shorter and mixed-case. A 128-bit digest is 32 hex characters or 24 Base64 characters; a
256-bit digest is 64 hex or 44 Base64 (with one = of padding). If a value contains
characters outside 0-9a-f, it is not hex and every hex candidate can be ruled out
immediately.
Identification is not cracking. Knowing a value is an MD5 does not help you recover the input, and no hash is "decryptable". What actually happens is guessing: hash a candidate and compare. That is why unsalted password hashes fall to lookup tables and why salted, slow hashes do not.
Checking a guess
Once you have a shortlist, test it. If you suspect MD5, hash a known input with the
MD5 generator and see whether the format matches. If you think
you are looking at an HMAC, the HMAC generator lets you try
candidate keys. Command-line tools can do the same in bulk: hashid and
hashcat --identify both take a file of values and print candidate types.
For a value you are expected to verify rather than attack, skip identification and use the checksum verifier: give it the value and the file, and it works out the algorithm from the length and tells you whether they agree.
Related
- Checksum verifier — compare a digest against content.
- Hash lengths — the complete size reference.
- Password hashing — reading and replacing
$…$formats. - What is MD5? — the algorithm behind the most common 32-character value.