Hash Calculator
100% CLIENT-SIDE
Input String (hashed as UTF-8)
Digests
MD5...
SHA-1...
SHA-256...
SHA-512...
More from MD5Calc
HMAC Calculator (SHA-256, SHA-1, SHA-512, MD5)
Compute an HMAC of a message with a secret key using SHA-256, SHA-512, SHA-1 or MD5, in your browser.
File Hash Calculator (MD5, SHA-1, SHA-256, SHA-512)
Compute the MD5, SHA-1, SHA-256 and SHA-512 checksum of a file in your browser, to verify a download.
Hash Comparison Tool
Compare two checksums without eyeballing them: case, spaces, colons and a sha256: prefix are ignored, the…
Guides
Frequently Asked Questions
Is MD5Calc secure for hashing sensitive data?
Use it for integrity checks, not for secrets. MD5 and SHA-1 are broken for collision resistance. For anything security-relevant, use SHA-256 or SHA-512, and use HMAC with a key rather than a bare hash when verifying provenance.
What hash algorithms are supported?
MD5, SHA-1, SHA-256 and SHA-512 on the home page, plus HMAC under all four on the HMAC calculator page. MD5 is pure JavaScript and the SHA family uses the Web Crypto API (https or localhost only), so nothing you hash is transmitted.
Can I hash a file instead of text?
Yes, on the file hash page, up to 256 MB because the whole file is read into the tab’s memory (it is never uploaded). For larger files use your operating system: certutil on Windows, shasum on macOS, sha256sum on Linux.
🧭 Pro Tips & Gotchas
What the hash buttons give you
- MD5 is computed in-page by a local implementation; SHA-1/256/512 go through
crypto.subtle.digestwith aTextEncoder-encoded input. Nothing is transmitted. - Because
crypto.subtleis a secure-context-only API, the SHA buttons requirehttps://(orlocalhost). On plain HTTP they will throw while MD5 keeps working. - Hashing the same string in two tabs and comparing is the intended use; results are case-normalised hex, so compare them as lowercase.
Hash gotchas
- MD5 is broken for collision resistance. It is fine for a checksum-of-convenience or a cache key; it is not fine for signatures, password storage, integrity against an attacker, or dedup where an adversary controls one input.
- The famous MD5 collision cost is trivial: chosen-prefix collisions are commodity-priced now. Never gate a trust decision on "the hashes match".
- Trailing whitespace and newlines change everything. A file ending in
\nversus one without produces completely different digests, andecho "x"adds a newline thatprintf 'x'does not. - Encoding is a silent input. UTF-8 bytes of
cafédiffer from Latin-1 bytes of the same string; if two systems disagree, hash the bytes, not the characters. - Line endings count. A CRLF checkout from git versus an LF working copy gives different hashes for identical-looking text (
core.autocrlfis the usual culprit). - For passwords, skip all of these hash functions: use Argon2id, scrypt, or bcrypt with a per-user salt. Fast hashes are the vulnerability, not the feature.
- Language interop fails on the hex string, not the algorithm: some runtimes emit uppercase, some emit base64. Normalise before comparing CI artifacts to local builds.
Developer Sponsor / Partner