How to Identify a Hash Type: MD5, SHA, bcrypt, NTLM and More
Learn to recognise hashes by length, alphabet and prefix, tell MD5 from NTLM and SHA-256 from Keccak, and decide which password hashes need upgrading.

How to Identify a Hash Type: MD5, SHA, bcrypt, NTLM and More
Security reviews, data migrations and incident investigations often start with a column of strange strings. Is this a password hash? Which algorithm made it? Is it salted? Knowing the answer tells you how the data must be migrated, how strong the protection is and, during an authorised audit, which cracking mode applies. The free Hash Type Identifier checks hashes against more than 80 formats and ranks the candidates by confidence.
Clue one: the prefix
Many modern formats label themselves. The modular crypt format used by Unix systems and many frameworks starts with a dollar sign and an identifier:
$1$is MD5 crypt, also used by Cisco type 5 passwords.$5$and$6$are SHA-256 and SHA-512 crypt, common in Linux shadow files.$2a$,$2b$and$2y$are bcrypt; the two digits after them are the cost factor.$argon2id$is Argon2, with its memory, time and parallelism settings written in the string.$y$is yescrypt, the default on several recent Linux distributions.
Applications add their own markers: pbkdf2_sha256$ in Django, $P$ in WordPress, a leading star in MySQL 4.1 and later, md5 in older PostgreSQL. When a prefix is present, identification is close to certain.
Clue two: length and alphabet
Unprefixed hashes are usually hexadecimal digests, and their length gives the output size:
- 32 hex digits (128 bits): MD5, NTLM, MD4 or LM.
- 40 (160 bits): SHA-1 or RIPEMD-160.
- 64 (256 bits): SHA-256, SHA3-256 or Keccak-256.
- 128 (512 bits): SHA-512, SHA3-512, BLAKE2b or Whirlpool.
The same digest may also be stored in Base64, which is shorter: an MD5 hash becomes 24 characters ending in two equals signs, and a SHA-256 hash 44 characters ending in one.
Clue three: context
Same-length hashes cannot be told apart by looking. A 32-digit hash from a Windows credential dump is NTLM; from a PHP application it is probably MD5. A 64-digit hash on a blockchain is likely Keccak-256; in a web app it is SHA-256. The identifier lists every plausible candidate so you can apply what you know about the source.
Hashcat modes
For each candidate the tool shows the hashcat mode number, such as 0 for MD5, 1000 for NTLM, 1800 for SHA-512 crypt and 3200 for bcrypt. Penetration testers and administrators recovering their own data use these modes with the hashcat password recovery tool. Only test hashes you own or have written permission to test; doing otherwise is illegal in most countries.
What the answer means
If your own system stores passwords with fast hashes such as MD5, SHA-1, SHA-256 or unsalted NTLM, the protection is weak: modern graphics cards try billions of guesses per second. The fix is a slow, salted password hash. The OWASP Password Storage Cheat Sheet recommends Argon2id, with scrypt, bcrypt or PBKDF2 as alternatives. A common migration path is to rehash each password with the new algorithm the next time the user signs in, and to wrap old hashes in the new algorithm in the meantime.
Not every hash is a password
Hashes also identify files, deduplicate data and sign messages. A SHA-256 value beside a download is a checksum, and a 40-digit hex string in a Git log is a commit id. The identifier names the algorithm either way, but only password hashes raise the storage questions above.
Step by step
- Paste one or more hashes, one per line.
- Read the most likely type and its confidence.
- Look at the alternatives for same-length formats.
- Use the source of the data to choose between look-alikes.
- Note the hashcat mode for an authorised audit, or plan an upgrade.
Privacy
Matching uses patterns in your browser. Hashes from client systems or incident data are never uploaded.



