ItsMyIp

MD5 & SHA digests

The hash of text as you type, or of a file by drag-and-drop — computed in your browser, nothing is transmitted.

  • Text and files are hashed in your browser (WebCrypto): nothing goes over the network — verifiable in your developer tools' Network tab.
  • MD5 and SHA-1 are broken for security (collisions): fine as checksums or for deduplication, banned for signatures, certificates and passwords.

01What is a digest for?

A hash function turns any data into a fixed-size fingerprint — 32 hex characters for MD5, 64 for SHA-256. A single modified byte changes the fingerprint entirely: it is the universal tool to verify integrity (is the downloaded file exactly the published one?), compare two files without opening them, or deduplicate.

Everything is computed in your browser: neither text nor files ever leave your machine — the same promise as our password and JWT tools. The SHAs go through the native WebCrypto API; MD5, absent from WebCrypto, is faithfully reimplemented (RFC 1321).

02Choosing an algorithm

MD5
128 bits, 1992. Broken since 2004 (collisions at will): only for checksums and legacy compatibility.
SHA-1
160 bits, 1995. Public collision demonstrated in 2017 (SHAttered): banned from certificates and signatures, still tolerated by Git (migrating).
SHA-256
256 bits, today's reference: TLS certificates, signatures, blockchain. The default choice for anything new.
SHA-384 / 512
The big brothers: longer, 64-bit arithmetic (often faster than SHA-256 on 64-bit CPUs for large volumes). Required by some standards.
Passwords
NONE of these: too fast, hence attackable by massive brute force. You need a dedicated slow function — bcrypt, scrypt, argon2.

03Verifying a download

Many projects publish the SHA-256 sum of their files. After downloading, drop the file above and compare the digest with the announced one: identical = intact and authentic file (if the sum comes from a trusted source); different = corrupted download… or worse.

On the command line, the local equivalent: shasum -a 256 file (macOS/Linux) or certutil -hashfile file SHA256 (Windows). To check whether a password has leaked, don't roll your own hash: our leak check does it properly via k-anonymity.

04Frequently asked questions

Can a hash be “decoded” back to the original?

No, by construction: hashing is one-way, the information is irretrievably compressed (a 1 GB file yields 64 characters). What does exist: giant lookup tables (rainbow tables) that recover short, predictable inputs — common passwords in particular. Which is exactly why passwords require slow, salted algorithms, not a bare SHA-256.

Why is MD5 still everywhere if it is broken?

Because “broken” refers to collision resistance: an attacker can craft two different contents with the same MD5. For detecting accidental corruption (downloads, disks), MD5 remains statistically flawless and very fast — hence its survival in checksums. As soon as an adversary enters the picture (signature, certificate, security deduplication), it is disqualified.

Is there a size limit for files?

The file is loaded into memory to be hashed: beyond a few hundred MB, the browser may slow down or refuse depending on the machine. For really large files, prefer the local command line (shasum, certutil), which streams without limits.

Two files with the same SHA-256 — possible?

Theoretically yes (digests are finite, files are not), in practice no: no SHA-256 collision has ever been found, and the odds of meeting one by chance are around 1 in 2¹²⁸ — less likely than winning the lottery weekly for a lifetime. Two identical SHA-256s = identical contents, as engineering certainties go.

05More tools