SHA Hash Generator
Hash text or a file with SHA-256, SHA-512, SHA-384 or SHA-1, and compare them with a checksum you were given.
Hashing: the text box.
How to generate a hash
- Type or paste text into the Text to hash box. All four results, SHA-256, SHA-512, SHA-384 and SHA-1, update as you type.
- To hash a file instead, use choose a file to hash. The line under the options confirms what is being hashed, and typing in the text box switches back to text.
- Choose lowercase or uppercase hexadecimal letters, whichever your other system expects.
- Decide how line endings are treated. "Hash exactly as typed" includes every space, while "Trim" ignores spaces and line breaks at the very start and end.
- To check a download, paste the checksum published by the supplier into Compare with a known hash. The tool tells you whether it matches.
Worked example
Type the word hello, all in lowercase and with nothing else in the box. The SHA-256 result is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 and the SHA-1 result is aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d. These are the standard values for that word, so you can use them to check any other hashing program.
Now paste the SHA-256 value in capitals into the compare box. The message reads "Match: this is the SHA-256 hash of your input." Case does not matter when comparing. Change the text to Hello with a capital H, and the SHA-256 becomes 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969, which looks completely different. Changing a single letter changes the whole result, which is exactly what makes hashes useful for spotting alterations.
How it works
A hash function turns any amount of data into a fixed-length fingerprint. Identical data gives an identical fingerprint every time, yet there is no way to rebuild the original data from the fingerprint. This page uses the Web Crypto API that is built into every modern browser. Text is first converted to UTF-8 bytes, so accented letters and emoji are handled consistently with other tools, then each algorithm runs on those bytes. Files are read straight from your disk into memory. Neither your text nor your files are uploaded.
Which algorithm should I pick?
SHA-256 is the everyday choice. It is what most software publishers, package managers and cloud storage services quote next to their downloads, and its 64-character result is short enough to compare by eye. SHA-512 produces a longer, 128-character fingerprint and can actually be faster on 64-bit computers. SHA-384 is a shortened version of SHA-512 that appears in some security certificates and in the integrity attribute used to check scripts loaded from a CDN. SHA-1 is only worth using when an older system specifically asks for it.
Tips
- When a checksum does not match, first look for an extra space or line break. Try the "Trim" option before assuming the file is damaged.
- Use SHA-256 or SHA-512 for new work. SHA-1 is included for older systems, but it is no longer considered secure against deliberate attacks.
- Do not use a plain hash to store passwords. Password storage needs a slow, salted method such as bcrypt or Argon2.
- Very large files, such as several gigabytes, may be slow or run out of memory in a browser. A command-line tool is better for those.
Frequently asked questions
Why is there no MD5 option?
Browsers' built-in cryptography does not include MD5, because it has been broken for years. SHA-256 is the modern replacement for checksums.
Can someone reverse my hash to get the text back?
Not directly. However, short or common inputs such as "password123" can be guessed by trying millions of options, so a hash does not make weak secrets safe.
Why does my result differ from another website's?
Usually because one input has a trailing line break or different character encoding. This tool hashes UTF-8 text exactly as shown unless you choose Trim.
What is a checksum used for?
Suppliers publish a checksum so you can confirm a download arrived complete and unchanged. If your result matches theirs, the file is identical to the one they released.
Is my data sent anywhere?
No. All hashing happens in your browser, and nothing you type or choose is transmitted.