Which algorithm to use
SHA-256 is the right answer for almost everything. It is fast, every language and tool supports it, and nobody has broken it. SHA-384 and SHA-512 give longer digests. On 64-bit hardware SHA-512 is often faster than SHA-256, even though its output is twice as long.
MD5 and SHA-1 are here because many systems still use them. Older APIs print them, download pages list them, and legacy databases are full of them. Both are broken, and neither should protect anything that matters.
Broken means someone can build two different inputs with the same digest. For MD5 that takes seconds on an ordinary laptop. So it is fine for spotting a file that got damaged on the way down. It is useless against anyone trying to fool you on purpose.
- Algorithms
- MD5, SHA-1, SHA-256, SHA-384 and SHA-512, plus the HMAC version of each SHA.
- Input
- Text in UTF-8 or Latin-1, or a file read as raw bytes. A file is held in memory once.
- Output
- Lowercase hex, uppercase hex or Base64. Paste a checksum in and it says which one matches.
- Engine
- Your browser's Web Crypto, except for MD5. Web Crypto leaves MD5 out, so this page computes it itself.
Hashing is not password storage
A SHA-256 of a password is quick to work out, which is exactly the wrong property. Someone with a stolen list can try billions of guesses an hour. Passwords need a slow, salted function built for the job: bcrypt, scrypt or Argon2.
Use this tool to check a download, compare two files, build a cache key, or see whether two things are the same. Do not use it to build a login.