Skip to main content

Text

Digests appear here as soon as you enter text or pick a file.

Digests are computed locally with Web Crypto; MD5 is intentionally omitted because it is insecure. SHA-1 is available only for legacy compatibility and must not be used for security decisions.

How to generate a SHA-256 hash of text or a file

Hash Generator computes the SHA-256, SHA-384, SHA-512, and SHA-1 digest of the same input at once, so you can compare a value against whichever checksum a project publishes without switching tools. Text is read as UTF-8 and files up to 64 MB are read straight from disk; both are hashed in this browser tab with the Web Crypto API, so nothing is uploaded. Every digest is shown as lowercase hex with its own copy button.

Hash an input in four steps

  1. Choose text or file inputThe input mode selector switches between a text box and a file picker. Text is encoded as UTF-8 before hashing, which is what command-line tools do by default, so the digests match.
  2. Enter the text or pick the fileType or paste the text, or select a file of up to 64 MB. The file is read in the browser and never leaves the machine. Press Load example to hash a known sample string and see the shape of the output.
  3. Read and copy the digestsAll four algorithms appear together as lowercase hex. Copy the one you need with the button on its row. While a changed input is being recomputed the old digest is marked stale and copying is locked, so you never paste a hash of text you already replaced.
  4. Compare it with the published checksumPaste the checksum you were given next to the generated one and compare them character by character, or paste the published value into a search field. Any difference at all means the bytes are not identical.

What people use Hash Generator for

  • Verify a download against its published checksumPick the downloaded file, read the SHA-256 row, and check that it matches the value on the release page before you run the installer.
  • Check whether two files are identicalHash each file in turn and compare the digests, which is faster and more reliable than comparing sizes or eyeballing the contents.
  • Produce a fixture value for a testGenerate the digest of a known string so a unit test can assert against a constant instead of recomputing it at runtime.
  • Confirm what a legacy system producedSome older integrations still emit SHA-1. The SHA-1 row is there so you can reproduce and check such a value, and it is labelled legacy for a reason.

Hash Generator questions

Is my text or file uploaded to a server?
No. Hashing runs in this browser tab with the Web Crypto API. The file is read locally and neither its contents nor the digest is sent anywhere.
Can a hash be turned back into the original text?
No. A digest is one-way — this page cannot reverse or crack one, and neither can anyone else in the general case. Short or common inputs can still be guessed by trying candidates until the digests match, so a bare hash is not a way to hide a secret.
Why is MD5 not offered?
MD5 is not included because practical collisions are known, which means two different files can share a digest. Offering it as a checksum would suggest a guarantee it no longer provides. Use SHA-256 instead.
Should I use SHA-1?
Only when something you do not control already uses it. SHA-1 is marked legacy and collision-prone on the page, and it must not be used for a new security decision such as verifying a signature or a download.
Is this suitable for hashing passwords?
No. Storing passwords needs a deliberately slow, salted algorithm such as bcrypt, scrypt, or Argon2, none of which are offered here. A plain SHA-256 of a password is fast to attack in bulk.
How large a file can I hash?
Up to 64 MB. Beyond that the page reports the file as too large instead of freezing the tab, because the whole file has to be held in memory to be hashed.
Why does my digest differ from the one my terminal printed?
Usually a trailing newline. Command-line tools hash the exact bytes of a file, and a text file that ends in a newline hashes differently from the same characters pasted without one.