Skip to main content
Develop Tools
← Return to usage guide

SHA-256 vs MD5: How to Verify File Hashes

A hash function produces the same fixed-length value from the same data. Hashes are useful for checking whether a file changed, but secure password storage requires a different design.

Flow of generating multiple hash values from a string or file and comparing them with the values of the distribution source
Flow of generating multiple hash values from a string or file and comparing them with the values of the distribution source

How to use algorithms

AlgorithmMain usesPoints to note
SHA-256Checking the integrity of distributed filesCurrent common first choice
SHA-384 / SHA-512Consistency checks that require long outputSelect the same method as the comparison destination
SHA-1Check with old distributionPoor collision resistance and unsuitable for new applications
MD5Check against old checksumNot used for security purposes

How to Verify a File

  1. Check the algorithm name and expected value provided by the distributor.
  2. Select the downloaded files and generate each hash value within your browser.
  3. Compares with the generated value without distinguishing between uppercase and lowercase letters in hexadecimal notation, excluding spaces and line breaks before and after the expected value.
  4. If they do not match, do not run the file, re-download it, and check the distribution source.

What a Hash Cannot Tell You

If an attacker replaces the file and the posted hash value at the same time, the values will match. Also check the route through which you obtained the expected value, such as HTTPS, signature, and official distribution page.

Plain SHA-256 is not suitable for password storage. Use a purpose-built password-hashing algorithm such as Argon2 or bcrypt, with a salt and an appropriate computational cost.

Even if the file name and update date and time are the same, the contents are not necessarily the same. A hash value is used to confirm content matching.

Try It in Your Browser

Your input is processed entirely in your browser. Keep the original data, review the output, and only then save or share it.

Open hash value generation/verification tool