Toolstia / Hash generator (SHA-256, SHA-512)
Generate SHA hashes for text or files
A hash turns any amount of data into a short fixed-length fingerprint. Identical input always gives identical output, and a one-character change gives a completely different result. This tool computes SHA-1, SHA-256, SHA-384 and SHA-512 for text you type or for a file you choose, and shows all four at once so you can copy the one you need.
People use it to confirm that a download matches the publisher's checksum, to detect whether two files are identical, and to produce a reproducible identifier for a piece of text. The data is hashed by your browser's built-in cryptography feature, so the file is not sent anywhere. It is a practical check when you have just downloaded an installer, a disk image or a document and want proof that it arrived intact.
Hashes are shown in lower-case hexadecimal. MD5 is not offered because browsers do not include it and it is no longer safe for security uses.
How it works
- Choose Text or A file.
- Type your text or drop the file.
- Copy the hash you need.
Checking a download
Software sites often publish a SHA-256 hash next to a download. Hash your downloaded file here and compare. If the values match exactly, the file is the one that was published and was not damaged in transit.
Which algorithm
SHA-256 is the usual choice today. SHA-384 and SHA-512 are longer variants. SHA-1 is shown for checking older files, but it is no longer considered safe against deliberate attacks.
Why no MD5
Browsers do not include MD5, and it is also broken for security uses, so it is not offered.
Not for passwords
Do not store passwords as a plain SHA hash. Use a purpose-built password hashing method such as bcrypt, scrypt or Argon2 on the server.
See how sensitive a hash is
The SHA-256 of hello is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Capitalize the first letter and Hello gives 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969, which shares nothing recognizable with the first. Add one trailing space to hello and you get 5e3235a8346e5a4585f8c58562f5052b8fe26a3bb122e1e96c76784964dfc461, and a trailing newline gives 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.
This is why a hash that does not match is such a strong signal: the file or text is not the same, even if it looks the same.
Output lengths and what they tell you
A SHA-1 hash is 40 hexadecimal characters, SHA-256 is 64, SHA-384 is 96 and SHA-512 is 128. These correspond to 160, 256, 384 and 512 bits. The length does not depend on the input, so a one-byte file and a one-gigabyte file produce hashes of the same length.
Hashes are shown in lower-case hexadecimal. If a website lists its checksum in capitals, compare ignoring case, since the letters mean the same digits.
Verifying a download step by step
Open the file option, drop the downloaded file in, and wait while it is read. Copy the SHA-256 value, then compare it with the published one character by character, or paste both into a text-comparison tool so you do not miss a single difference. An exact match means your copy is bit-for-bit what the publisher hashed.
There is an important limit. If the checksum is on the same web page, and an attacker controls that page, they can change both the file and the checksum. A hash proves integrity best when the reference value reaches you through a separate, trusted route, such as a signed announcement or a different site.
Text mode details that change the result
Text is hashed as UTF-8 exactly as it sits in the box. A different line ending, a space at the end, or text copied from a document with a hidden character will give a different hash from another tool, so check these first when your result disagrees. Text pasted from Windows may carry carriage returns that the box may normalize to plain line feeds.
Nothing appears for an empty text box. An empty file, however, is valid input, and its SHA-256 is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855, a value you will meet in many logs.
Limits of the tool and of hashing itself
A file is read into memory in one go, which is why the limit is 200 MB. For a larger disk image or video, a command-line tool such as sha256sum, which reads in small chunks, is a better fit. The tool also needs a secure page, so on an insecure connection the browser's crypto function may be missing and an error message explains that.
A hash is a one-way fingerprint, not encryption, and not a signature. It cannot be turned back into the data, it does not prove who made the file, and a plain fast hash is a poor way to store passwords. There is no HMAC option here, and MD5 is deliberately absent.
Questions
Is my file uploaded?
No. The file is read and hashed in your browser. It never leaves your device.
How large a file can I hash?
Up to 200 MB. Larger files need much more memory than a browser tab usually has.
Why does the same text give a different hash elsewhere?
A trailing space, a different line ending or different text encoding changes the hash. This tool hashes your text as UTF-8 exactly as typed.
Is a hash the same as encryption?
No. A hash cannot be reversed to get the original data back.
Which hash should I pick?
Use SHA-256 unless a site or system tells you otherwise. Use the algorithm the publisher lists when you are comparing against their value, since a SHA-1 value will never match a SHA-256 one.
Can two different files have the same hash?
In theory yes, since there are more possible files than hashes. In practice for SHA-256 the chance is negligible. For SHA-1, deliberate collisions have been produced, which is why it should not be trusted for security.
Why does hashing a file take a moment?
The whole file is loaded into memory and hashed four times, once per algorithm, so large files take longer on slow devices. A status note appears while it works.
Can I find the original text from a hash?
Not by reversing it. Attackers only succeed by guessing candidate inputs and hashing them, which is why short or common inputs are weak and long random ones are not.
Do the file name or the date change a file's hash?
No. Only the contents matter. Renaming a file or changing its modified date leaves the hash exactly as it was.