The arithmetic
Hexadecimal uses four bits per character, so the hex length is simply bits ÷ 4.
Base64 uses six bits per character and pads to a multiple of four, so it is
ceil(bits ÷ 6) rounded up to the next multiple of 4.
That single fact explains every number in the table below, and it is why a 128-bit digest is 32 hex characters but only 24 in Base64.
The table
| Algorithm | Bits | Hex | Base64 | Collision strength | Status |
|---|---|---|---|---|---|
| CRC-32 | 32 | 8 | 8 | n/a | Not a hash |
| MD4 | 128 | 32 | 24 | broken | Deprecated |
| MD5 | 128 | 32 | 24 | broken | Legacy only |
| NTLM | 128 | 32 | 24 | broken | Windows password store |
| RIPEMD-160 | 160 | 40 | 28 | 80 bits | Legacy |
| SHA-1 | 160 | 40 | 28 | broken | Legacy |
| SHA-224 | 224 | 56 | 40 | 112 bits | Fine |
| SHA-256 | 256 | 64 | 44 | 128 bits | Recommended |
| SHA-512/256 | 256 | 64 | 44 | 128 bits | Fine |
| SHA3-256 | 256 | 64 | 44 | 128 bits | Fine |
| BLAKE2s-256 | 256 | 64 | 44 | 128 bits | Fine, fast |
| BLAKE3-256 | 256 | 64 | 44 | 128 bits | Fine, very fast |
| SHA-384 | 384 | 96 | 64 | 192 bits | Recommended |
| SHA3-384 | 384 | 96 | 64 | 192 bits | Fine |
| SHA-512 | 512 | 128 | 88 | 256 bits | Recommended |
| SHA3-512 | 512 | 128 | 88 | 256 bits | Fine |
| Whirlpool | 512 | 128 | 88 | 256 bits | Rare |
| BLAKE2b-512 | 512 | 128 | 88 | 256 bits | Fine, fast |
"Collision strength" is half the output size, which is the birthday bound: finding a collision by brute force costs about 2^(bits÷2) operations. MD5's 128 bits therefore give at most 64 bits of collision resistance even if the algorithm were sound, and since it is not, the real figure is far lower.
Reading a digest quickly
- Count the characters. 32 → 128-bit family, 40 → 160-bit, 64 → 256-bit, 96 → 384-bit, 128 → 512-bit.
- Check the character set. Only
0-9a-fmeans hex. Mixed case with+/=means Base64. Uppercase only with a leading*suggests a MySQL password hash. - Look for a prefix.
$2y$,$argon2id$,$6$,{SSHA}name the algorithm outright — no guessing needed. - Narrow by context. A value in a
.sha256file is SHA-256. A value in a password column is a password hash, not a checksum.
The hash identifier does all four steps and lists the candidates with a confidence label.
Where the count misleads
- Truncation. Some systems store only the first 16 or 20 characters of a digest. A 16-character hex value could be CRC-64, a truncated hash, or an integer.
- Wrapped output.
certutilon older Windows inserts spaces; some tools print colon-separated pairs like an SSH fingerprint. Spaces and colons are not part of the value. - Decimal forms. CRC-32 is often shown as an unsigned decimal integer (up to 10 digits) rather than 8 hex characters.
- Same size, different algorithm. MD5, MD4, NTLM and LM are all 128 bits and all render as 32 hex characters. Length cannot separate them.
- Double hashing. A 64-character value is usually SHA-256, but could be two concatenated MD5s. Context decides.
Shortcut for the common case. If someone hands you a digest and asks you to check a file, you do not need to identify it first. Paste it into the verifier — the length tells the tool which algorithm to compare, and the answer is immediate.