Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text or a file, entirely in your browser. Verify a hash by pasting it in for an instant match check.
Hash some text or a file above to enable verification.
A cryptographic hash function is an algorithm that maps input data of any length to a fixed-length output — 128 bits for MD5, 160 bits for SHA-1, 256 bits for SHA-256, and so on — such that the same input always produces the same output, but there's no practical way to work backward from the output to the input, and no practical way to find two different inputs that produce the same output. These three properties (determinism, one-wayness, and collision resistance) are what separate a cryptographic hash from a simple checksum like a CRC, which is fast but not designed to resist deliberate tampering.
This tool computes five different hash algorithms — MD5, SHA-1, SHA-256, SHA-384, and SHA-512 — from the same input, entirely in your browser. SHA-1 through SHA-512 run through the Web Crypto API, a native browser interface built specifically for cryptographic operations, while MD5 (which modern browsers deliberately don't expose through Web Crypto, since it's considered obsolete for security purposes) runs through a compact, standards-compliant JavaScript implementation of the original RFC 1321 algorithm.
MD5 produces a 128-bit (32 hex character) digest and was, for many years, the default choice for checksums and basic integrity checks — but practical collision attacks (deliberately crafting two different files with the same MD5 hash) have been demonstrated since 2004, so it should never be relied on where security matters, only for casual accidental-corruption checks. SHA-1 produces a 160-bit (40 hex character) digest and was the security industry's default for over a decade, but it was formally broken by a practical collision attack in 2017 (the 'SHAttered' attack) and has since been deprecated by major browsers, certificate authorities, and Git itself for anything security-sensitive.
SHA-256, part of the SHA-2 family, produces a 256-bit (64 hex character) digest and remains the current industry-standard choice for almost everything — TLS certificates, Bitcoin's proof-of-work, Git's newer object hashing, and password-adjacent integrity checks — with no known practical collision attack. SHA-384 and SHA-512 are also SHA-2 family members, producing 384-bit (96 hex character) and 512-bit (128 hex character) digests respectively; they offer a larger security margin than SHA-256 and, perhaps counterintuitively, can actually run faster than SHA-256 on 64-bit hardware, since SHA-512's internal operations are natively 64-bit.
File integrity verification is the most common everyday use: software publishers often publish a SHA-256 checksum alongside a download so users can confirm the file wasn't corrupted in transit or tampered with by a compromised mirror — you hash the downloaded file yourself and compare it against the published value. Deduplication systems (backup tools, cloud storage, package managers) hash file contents to detect when two files are byte-for-byte identical without needing to compare every byte directly, which is dramatically faster for large files.
Version control systems like Git use SHA-1 (with SHA-256 support increasingly available) to identify every commit, tree, and blob by the hash of its content, meaning two repositories with identical history will always compute identical commit hashes, and any tampering with history is immediately detectable since it changes every downstream hash. Content-addressed storage systems (IPFS, many CDNs, container image registries) use a file's hash as its permanent identifier, which naturally deduplicates identical content and lets you verify you received exactly the content you asked for. Digital signatures also depend on hashing: rather than cryptographically signing an entire large document (slow), a signature scheme signs the document's hash instead (fast), since verifying the hash matches is equivalent to verifying the full content matches.
It's a common point of confusion, but hashing and encryption solve fundamentally different problems. Encryption is reversible by design — encrypt data with a key, and anyone holding the corresponding key can decrypt it back to the original plaintext; the whole point is that the original data is recoverable. Hashing is deliberately one-way — there is no key, and no legitimate operation exists to recover the original input from a hash, because a hash isn't meant to store or protect the data itself, only to serve as a fixed-size fingerprint of it.
This distinction matters most in password storage: a well-designed system never encrypts passwords (since that would mean someone with the decryption key could recover every user's actual password), it hashes them instead — specifically with a slow, salted password-hashing algorithm like bcrypt, scrypt, or Argon2, not a fast general-purpose hash like the ones in this tool. Fast hashes like MD5 or SHA-256 are actually a poor choice for password storage precisely because they're fast: an attacker with a stolen hash database can attempt billions of guesses per second against a fast hash, whereas a purpose-built password hash is deliberately slow and memory-intensive to make large-scale guessing impractical.
Hash Generator produces a fixed-size fingerprint of your data. These related developer tools cover the reversible encodings and other identifiers you'll often use alongside hashes.