Skip to content
ProfitTool
Back to all articles
Developer Tools
1 min read

How to Identify a Hash Algorithm from a Hash String

Length and character set narrow an unknown hash down fast. How to tell MD5 from SHA-256, and how to spot bcrypt, Argon2 and NTLM from their prefixes.

ProfitTool Team

Security & Dev

Why Hash Identification Matters

Developers frequently encounter hash strings without clear context — a password field in a legacy database, a file checksum in documentation, an API token format. Identifying the algorithm helps you understand the security properties (is it crackable? is it a password hash or a data hash?) and make appropriate decisions.

Identification by Length (Hex Hashes)

For hashes stored as hexadecimal strings, length alone narrows the candidates significantly:

Hex lengthBitsPossible algorithms
8 chars32CRC32
16 chars64MySQL 3.x
32 chars128MD5, NTLM, RIPEMD-128
40 chars160SHA-1, RIPEMD-160
56 chars224SHA-224, SHA3-224
64 chars256SHA-256, SHA3-256, BLAKE2s
96 chars384SHA-384, SHA3-384
128 chars512SHA-512, SHA3-512, Whirlpool

Identification by Prefix (Password Hashes)

Password hashing algorithms add recognisable prefixes that identify both the algorithm and parameters:

PrefixAlgorithm
$1$MD5 crypt (legacy Linux)
$2b$ or $2a$bcrypt
$5$SHA-256 crypt (Linux)
$6$SHA-512 crypt (Linux) — most common
$argon2i$Argon2i
$argon2d$Argon2d
$argon2id$Argon2id (recommended)
pbkdf2_sha256$Django PBKDF2
{SSHA}Salted SHA-1 (LDAP)

What You Cannot Determine From Length Alone

Several algorithms produce hashes of the same length. A 32-character hex string could be MD5, NTLM, or RIPEMD-128. A 64-character hex string could be SHA-256, SHA3-256, or SHA-512/256. Context matters — where did the hash come from?

Data Hash vs Password Hash

  • Data hashes (checksums, file integrity): typically SHA-256, SHA-512, BLAKE3. Fast algorithms are appropriate here.
  • Password hashes: must use slow, salted algorithms (bcrypt, Argon2, PBKDF2). If you find an MD5 or SHA-1 password hash, it is insecure.

Use our Hash Type Identifier to paste any hash and get instant identification results.

Tags:#hash identifier#cryptography#md5#sha256#bcrypt#security

ProfitTool Team

Security & Dev

Written and maintained by the ProfitTool team. Where an article references a ProfitTool utility, the behaviour described is the behaviour of the tool on this site — you can open it and check the output yourself.