SHA-256 Hash Generator

Enter text or choose a file to get its SHA-256 straight away; SHA-1, SHA-384 and SHA-512 are available too. Paste the hash the publisher gave you and it is checked automatically, so you know the file has not been altered. Everything is computed locally in your browser — nothing is uploaded.
Text input
File upload
Drop a file here, or click to choose one

Any file type, up to 50 MB

Algorithm
Checksum
Notes:
1. Use either text input or a file upload — if both are given, the file wins.
2. When the text box is empty, the current timestamp is used as the input.
3. Files are limited to 50 MB; anything larger reports an error.
4. The checksum box accepts a whole sha256sum line — hash, spaces, filename — and takes just the hash from it.
5. SHA is a one-way hash (often loosely called "encryption") and cannot be decrypted.

Choosing between SHA-256 and MD5

Is SHA really "encryption"?

Strictly speaking no, just as with MD5. Encryption is reversible: with the key you can recover the original. SHA is a one-way hash function that squeezes an input of any length into a fixed-length digest. Information is lost along the way, so there is no "recover" step to speak of. People commonly call it "SHA256 encryption", and this page follows that habit, but what it means is computing a SHA-256 value. There is likewise no such thing as "SHA256 decryption" — sites offering it are doing rainbow-table lookups, explained in more detail on the MD5 hash generator page.

Why you should move off MD5 and SHA-1

It is not simply that more bits are safer — it is that the first two have actually been broken. Producing two files with different contents but the same MD5 takes an ordinary computer a few seconds. SHA-1 was collided for real by Google's SHAttered in 2017, and by 2020 chosen-prefix collisions had brought the cost down to a few tens of thousands of dollars. That means someone can prepare a pair of files with different contents but identical hashes, so your check passes while you receive the other one. SHA-256 has no known practical collision, and it is what TLS certificates, newer versions of Git and software release checksums generally use.

But do not store passwords with plain SHA-256

This is the most common misuse. SHA-256 is designed to be fast — a modern graphics card computes billions of them per second, which is exactly what an attacker brute-forcing your database wants. Store user passwords with a slow hash such as bcrypt, scrypt or Argon2: they salt automatically (a random salt per user, which defeats rainbow tables and credential stuffing) and let you tune the work factor upward as hardware gets faster. Salting SHA-256 by hand stops rainbow tables, but it does not stop a brute-force attack on one specific account.

SHA-256, SHA-384 or SHA-512?

All three belong to the SHA-2 family; they differ in internal word size and output length. SHA-256 works on 32-bit words, has the broadest compatibility and is the sensible default almost everywhere. SHA-512 works on 64-bit words and is often faster on a 64-bit CPU, with a longer output. SHA-384 is SHA-512 truncated to 384 bits, seen in some certificates and TLS suites. Without a specific requirement, use SHA-256 — it is most likely what the value you are checking against is anyway.

FAQ

Can SHA-256 be decrypted?

No — it is irreversible by design. Sites claiming to do "SHA256 decryption" perform rainbow-table lookups: they precompute hashes for vast numbers of common strings and store them, then check whether the hash you give them is in the table. A hit only tells you your input was a common string. A long random passphrase, or any password that was salted, will never be found by such a site.

Should I use SHA-256 or MD5?

For anything security-related, always SHA-256. MD5 and SHA-1 have both been collided in practice and can no longer be used to detect tampering or to sign anything. Use MD5 only when the other side explicitly asks for it — for instance when a legacy system publishes its checksums as MD5. To compute one, use our MD5 hash generator; that page explains how "MD5 decryption" sites really work.

Is SHA-1 still usable?

Not for any security purpose. It was collided for real back in 2017, and browsers and certificate authorities dropped it long ago. SHA-1 is offered here because plenty of older systems, repositories and documents still publish SHA-1 checksums and you need a way to compute one to compare against — not because it is still safe.

How do I check that a download has not been tampered with?

Drop the file into the upload box above, paste the hash the publisher gave you into the checksum box, and press compute. A match shows in green, a mismatch in red. If the hash you pasted is the wrong length for the selected algorithm, the page tells you which one it probably belongs to — the publisher giving a SHA-1 while SHA-256 is selected is far and away the most common false mismatch.

Another site gives a different value — which one is wrong?

Most likely neither: the inputs differ. The three usual causes are a stray newline at the end of the text; line endings being \r\n rather than \n (Windows Notepad and Linux disagree); and non-ASCII characters being encoded as something other than UTF-8. This page encodes text as UTF-8 and adds no trailing newline. The surest way to rule all of this out is to hash the file itself rather than pasted text.

Why the 50 MB file limit?

The browser's WebCrypto API can only digest one contiguous block of data — it offers no streaming interface — so the whole file has to be read into memory first. 50 MB is a ceiling that will not choke a phone. For anything larger, use the command-line tool your system already has: on Windows, certutil -hashfile FILENAME SHA256; on macOS and Linux, shasum -a 256 FILENAME.

Does upper case or lower case matter?

No — they are two spellings of the same hexadecimal string, and comparisons ignore case. This page outputs lower case by default, which is also what sha256sum and shasum do. Tick the box to switch to upper case. The checksum comparison ignores case differences for you, so there is no need to normalise anything by hand.

Is my file uploaded to a server?

No. The computation uses the browser's built-in WebCrypto API: the file is read into memory, hashed and shown, and not one byte leaves your device. Disconnect from the network once the page has loaded and the tool still works — that is the most direct way to verify it. See the Privacy Policy.