What a hash is
A hash function turns any amount of data into a short fingerprint of fixed length: 128 bits for MD5, 160 for SHA-1, 256 for SHA-256, shown as 32, 40 or 64 hexadecimal characters. The same input always gives the same hash, and changing one letter or one byte gives a completely different one. There is no way to turn a hash back into the data. That makes hashes the standard way to confirm that two files are identical without comparing them byte by byte, to detect a damaged or incomplete download, and to notice when a document was changed after it was shared.
Checking a download against its published checksum
Software and operating-system websites often list a SHA-256 value next to each download. Choose File, pick the file you downloaded and paste the published value into the compare box. The tool accepts the usual ways of writing it: the bare hash in upper or lower case, a line from the sha256sum command such as the hash followed by two spaces and the file name, and the BSD style SHA256 (file.iso) = hash. It works out the algorithm from the length and tells you which one matches. If nothing matches, your file is not the one the site published: download it again from the official site and do not run it.
MD5 and SHA-1 catch errors, not attacks
RFC 6151, the IETF update to the security notes of MD5, says published attacks make it unwise to use MD5 where collision resistance is needed, because people can deliberately create two different files with the same MD5. It still catches accidental damage, and many older systems publish it. NIST announced in December 2022 that SHA-1 should be phased out by 31 December 2030 in favour of the SHA-2 and SHA-3 families. Wherever someone might cheat, such as checking software or signing documents, use SHA-256 or longer. The SHA hashes here come from your browser's built-in Web Cryptography API, which implements the FIPS 180-4 standard; MD5, which browsers do not offer, is computed by our own code and tested against the RFC 1321 test suite.
Why the same text can give a different hash
A hash works on bytes, not on what you see. Text is converted to UTF-8, the encoding the web uses, so Arabic and emoji give the same hash here as on Linux, macOS and in most programming languages. The usual cause of a mismatch is invisible: Windows ends lines with CR LF and Linux with LF, a copied value can carry a trailing space or line break, and some editors add a line break at the end of a file. Use the line-ending and trim options to match the other system. Files are hashed exactly as stored, byte for byte, so renaming a file does not change its hash.
HMAC, signatures and passwords
An HMAC, defined in RFC 2104, mixes a secret key into the hash, so only someone who knows the key can produce or check the value. Payment gateways and webhooks commonly sign the messages they send with HMAC-SHA-256; paste a message body and your signing secret here to see the signature your server should compute. The key is used only on this page and is never stored. Do not use a plain hash, even SHA-256, to store passwords: they need a slow, salted method such as bcrypt, which our htpasswd generator uses. To create a strong password, use the password generator.
- NIST FIPS 180-4: Secure Hash Standard
- RFC 1321: The MD5 Message-Digest Algorithm (IETF)
- RFC 6151: Updated Security Considerations for MD5 and HMAC-MD5 (IETF)
- NIST: NIST Retires SHA-1 Cryptographic Algorithm (December 2022)
- RFC 2104: HMAC, Keyed-Hashing for Message Authentication (IETF)
- Base64 encoder and decoder
- JSON formatter