What a hash is
A hash function turns any input into a fixed-length fingerprint. The same input always gives the same hash, and changing a single character changes the whole result. You can't reverse a hash back into its input, which is what makes hashes useful for checking integrity. Type or paste text and the tool shows MD5, SHA-1, SHA-256 and SHA-512 as you type.
Input: hello MD5: 5d41402abc4b2a76b9719d911017c592 SHA-256: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Which algorithm to use
- SHA-256: the default choice for checksums, signatures and content addressing. 64 hex characters.
- SHA-512: a longer 128-character digest; similar security in practice, sometimes faster on 64-bit machines.
- MD5 (32 characters) and SHA-1 (40 characters): broken for security, because collisions can be manufactured. Use them only to match legacy checksums, never for anything an attacker could exploit.
Why your hash doesn't match
- A trailing newline:
echo hello | sha256sumhasheshelloplus a newline. Useecho -norprintfto match this tool. - Encoding: this tool hashes the UTF-8 bytes of your text. A system that uses UTF-16 or Latin-1 gives a different result for non-ASCII characters.
- Case and whitespace: hashes are exact, so
Helloandhello(with a space) differ completely.
Don't use plain hashes for passwords
SHA-256 is designed to be fast, which helps attackers try billions of guesses. Passwords need a slow, salted algorithm such as bcrypt, scrypt or Argon2; try the Bcrypt Generator. To prove a message came from someone holding a secret key, use an HMAC (HMAC Generator) rather than hashing the secret together with the message.