What Is a Hash Function?
A cryptographic hash function digests input of any size — a password, a sentence, a 4 GB ISO — into a fixed-length string of hex characters called the digest. Three properties make it useful: it is deterministic (same input, same hash, always), it is one-way (you cannot reconstruct the input from the digest), and it is collision-resistant (nobody can practically craft two different inputs with the same hash). Change a single byte anywhere in the input and the entire digest changes — which is exactly what makes hashes the universal tool for verifying that data is what it claims to be.
This tool computes hashes entirely in your browser: the SHA family via the native Web Crypto API, MD5 via an embedded pure-JS implementation. Text and files never leave your device — hash confidential files with confidence.
The Five Algorithms: MD5, SHA-1, SHA-256, SHA-384, SHA-512
- MD5 — 128-bit digest, from 1991. Fast, everywhere, and cryptographically broken: collisions can be manufactured in seconds. Still fine for detecting accidental corruption; worthless against adversaries. Web Crypto dropped it for this reason — this tool ships it only for legacy checksum matching.
- SHA-1 — 160-bit, the long-time default for Git commits and TLS. Practical collision attacks were demonstrated in 2017 (SHAttered), so browsers and CAs have retired it. Treat like MD5: checksums yes, security no.
- SHA-256 — 256-bit, the modern workhorse. TLS certificates, Bitcoin, package registries, download checksums — when a site prints one hash today, it is almost always SHA-256. Start here.
- SHA-384 / SHA-512 — same SHA-2 family, larger digests (384/512 bits). SHA-512 is actually faster than SHA-256 on 64-bit machines and the go-to for large-file integrity; SHA-384 pairs with certain TLS and government profiles.
Checksum vs Password Hashing: The Critical Difference
The single most common hash misunderstanding: hashing a password is not “securing” it. MD5 and SHA-* are designed to be fast — that is the point for checksums, and the disaster for passwords, because an attacker with your database can try billions of guesses per second against fast hashes. Real password storage needs slow, salted key-derivation functions — bcrypt, scrypt, or Argon2 — that make each guess expensive and add a unique salt so identical passwords do not produce identical digests. Use this tool to verify files and compare data; use your framework’s password API (it picks the KDF for you) for logins.
Verifying Downloads the Right Way
Projects publish checksums like a3f2…c9e1 ubuntu-24.04.iso. The verification loop: hash your downloaded file here (file mode, SHA-256), copy the digest, and compare it character-by-character with the published one — or paste both into a diff tool, because a single wrong character matters. Match means the file is bit-for-bit what the publisher hashed; mismatch means a corrupted or tampered download, and it does not matter how plausible the file looks afterwards. One nuance: this proves integrity relative to the published checksum — for full assurance, fetch the checksum over HTTPS (or its GPG signature) from the project’s official site.
Where You Already Meet Hashes Daily
- Git — every commit ID is a SHA-1 (migrating to SHA-256) over the commit content plus history, which is why history is tamper-evident.
- Package managers — npm lockfiles pin integrity hashes; pip and Cargo verify every download against a recorded digest.
- CDN caching — content-addressed filenames (app.a3f2c9.js) mean “changed content = changed name = cache busted automatically”.
- Blockchains — block hashes chain to the previous block (hence the name), and Merkle trees summarize thousands of transactions with one root digest.
The Avalanche Effect
Try this experiment in the tool: hash Hello world, then hash Hello world. — one added period. Every hex digit of the SHA-256 output changes. This is the avalanche effect: a well-designed hash spreads a one-bit input change across all output bits, so digests reveal nothing about their input (not its length, structure, or similarity to anything else). It is also why “these two files are 99.99% identical” is a statement only hashes can adjudicate — compare digests, not eyeballs.
Why 100% In-Browser Matters for Hashing
Hashing is the one tool category where “upload your file” is actively risky: you might be hashing something confidential — a contract, an un-published build, a suspicious download — and shipping it to a stranger’s server to have it hashed. This generator computes everything locally: crypto.subtle.digest runs in your browser’s secure context, MD5 runs in JS, and 500 MB files are read with the File API without a single network request. Verify in DevTools if you like — the Network tab stays empty.
Step-by-Step: Using the Hash Generator
- Choose text or file mode. Text hashes as you type (UTF-8); files can be dropped in up to 500 MB.
- Select algorithms. SHA-256 by default; add SHA-512 for large files, MD5/SHA-1 only to match legacy published checksums.
- Read the digests. Lowercase hex, the standard format for comparison with published checksums.
- Copy per-algorithm or copy-all into your verification notes, ticket, or terminal
echocomparison. - Compare exactly. Every character must match — or use your OS’s built-in checker (shasum -a 256, certutil) as a second opinion.
Ready to Generate a Hash?
You know which algorithm to trust, why MD5 survives only as a checksum, how to verify a download properly, and what the avalanche effect proves. Scroll back up, drop your file, and get a SHA-256 digest in seconds — computed entirely on your device.
