What is a hash function?
A hash function takes any input (a word, a paragraph, or a whole file) and produces a fixed-length string of characters called a digest. The same input always yields the same digest, but even a one-character change produces a completely different result, and you cannot reverse a digest back into the original. This tool computes MD5, SHA-1, SHA-256, SHA-384, and SHA-512 digests locally in your browser.
Verifying file integrity
The most common everyday use is checking that a download is intact and unaltered. A site publishes the expected hash of a file; you hash your downloaded copy and compare. If the two digests match, the file is byte-for-byte identical to the original. If they differ, the file was corrupted in transit or tampered with.
Which algorithm should you use?
MD5 and SHA-1 are fast but cryptographically broken: attackers can engineer collisions, so they should not be used for security, only for non-adversarial checksums. The SHA-2 family (SHA-256, SHA-384, SHA-512) is the current standard for integrity and digital signatures. SHA-512 uses 64-bit operations and can be faster on 64-bit hardware, while SHA-256 produces a shorter digest; both are considered secure.
Do not use plain hashes for passwords
Storing passwords as a plain SHA-256 hash is unsafe, because fast hashes let attackers guess billions of candidates per second. Passwords should be protected with a slow, salted password-hashing algorithm designed for the job, such as bcrypt, scrypt, or Argon2. General-purpose hashes like the ones here are for integrity and fingerprinting, not credential storage.
Last updated: July 2026