A hash function turns any text into a fixed-length fingerprint. The same input always gives the same hash, but a tiny change (even one letter) gives a completely different one, and you cannot work backwards from the hash to the text. SHA-256 produces 64 hexadecimal characters (256 bits), SHA-1 produces 40, SHA-384 produces 96 and SHA-512 produces 128. This page hashes your text as UTF-8 using the Web Crypto API built into your browser, so nothing leaves your device. Use hashes to check that a file or message has not changed, to compare values without storing them, or to learn how hashing works.
| Text | SHA-1 | SHA-256 |
|---|---|---|
| (empty text) | da39a3ee5e6b4b0d3255bfef95601890afd80709 | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 |
| abc | a9993e364706816aba3e25717850c26c9cd0d89d | ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad |
| hello | aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d | 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 |
| Hello | f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0 | 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969 |
Use SHA-256 for most things such as checksums and integrity checks. SHA-1 is considered broken for security uses (collisions can be produced), so keep it only for compatibility, for example with older systems or Git object names. SHA-384 and SHA-512 are longer variants of the same SHA-2 family.
MD5 is broken for security and is not built into browsers. If you only need to compare two files or texts, SHA-256 does the same job.
Not a plain SHA hash. Passwords should be stored with a slow, salted algorithm such as bcrypt, scrypt or Argon2, because plain SHA hashes can be guessed very quickly. This tool is for checksums and learning.
No. Encryption can be reversed with a key; a hash cannot be reversed. Two different texts can in theory share a hash, but for SHA-256 this is practically impossible to find.
Usually line endings or trailing spaces. A final newline, or Windows (CRLF) versus Unix (LF) line breaks, changes the hash. This tool hashes exactly the characters in the box, encoded as UTF-8.
Hashing is done locally with the browser crypto API. Do not rely on a plain hash to protect passwords.
See also: password generator · password strength checker · UUID generator · Base64 encoder · text to binary · all tools