Hash Generator (SHA-256 / SHA-512)
Compute SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text or file — locally with the browser's WebCrypto, nothing uploaded.
1,201 views
Computing…
Could not read the file.
How It Works
A cryptographic hash function takes an input of any size — a word, a paragraph, a multi-gigabyte file — and produces a fixed-length output called a digest: 160 bits for SHA-1, 256 for SHA-256, 384 for SHA-384, 512 for SHA-512. This tool computes all four locally using the browser's built-in WebCrypto engine, the same audited implementation your HTTPS connections already rely on, so even large files hash quickly and never leave your device.
Three properties make these functions useful. First, they are one-way: given a digest, there is no practical way to recover the original input — the only option is to re-hash a guess and compare. Second, they are deterministic: the same input always produces exactly the same digest, which is what makes a checksum meaningful in the first place. Third, they exhibit the avalanche effect — changing a single bit of the input, say one character in a multi-gigabyte file, flips roughly half the bits of the output. A digest that differs by even one hex character means the inputs are not identical, full stop.
Typical example: a software vendor publishes sha256sum: 9f86d0... alongside a download. After downloading, hash the file here and compare the two strings character by character — if they match, the file arrived intact; if they do not, it was corrupted or tampered with in transit. The same technique works for comparing two files for byte-identical content, or for generating a stable cache-busting key from a file's contents.
What You Should Know
MD5 is deliberately not offered. It is cryptographically broken: researchers have demonstrated practical collision attacks, meaning two different inputs can be crafted to produce the identical MD5 digest, which defeats its purpose for integrity or security checks. Browsers' WebCrypto API excludes it entirely for this reason. If a vendor only publishes an MD5 checksum, treat it as a last resort and ask for SHA-256 — virtually every modern distribution provides one.
SHA-1 is fine for detecting accidental corruption (a bad download, a disk error) but is deprecated for security purposes such as certificates and digital signatures, since collision attacks against it have also been demonstrated; prefer SHA-256 or higher whenever the result needs to resist a deliberate attacker.
Finally, hashing alone is not how passwords should be stored: a bare SHA-256 of a password is fast to compute, which means an attacker with a stolen database can try billions of guesses per second. Proper password storage adds a unique random salt per account and uses a slow, purpose-built function (bcrypt, scrypt, or Argon2) — this tool is for checksums and integrity verification, not authentication.
Frequently Asked Questions
Why is MD5 not offered?
Browsers' WebCrypto deliberately excludes MD5 because it is cryptographically broken. If a vendor only publishes an MD5 checksum, ask for SHA-256 — any modern distribution provides it.
Is SHA-1 safe to use?
For integrity checks against accidental corruption, yes. For security purposes (signatures, certificates) SHA-1 is deprecated — prefer SHA-256 or higher, which is why they are listed first.
Are my files uploaded to hash them?
No. The file is read and hashed inside your browser with WebCrypto; nothing is transmitted anywhere.
Can a hash be reversed back into the original input?
No — that is the entire point of a one-way function. There is no mathematical shortcut from digest to input; the only way to "reverse" one is to guess inputs and hash them until a match is found, which is only practical against short or predictable inputs. That guessing approach is exactly how leaked, unsalted password-hash dumps get cracked.
Is it OK to hash passwords with this tool and store the result?
Not for a real authentication system. A raw SHA-2 hash of a password is deterministic and fast, so a stolen database of hashes can be brute-forced quickly. Password storage needs a salt (unique random data per account) and a deliberately slow algorithm like bcrypt or Argon2 — this tool is meant for file and text integrity checks, not credential storage.
Similar Tools
Report a Problem
Hash Generator (SHA-256 / SHA-512)
Comments
No comments yet — be the first to write one!