JSON Formatter
Pretty-print, validate and minify JSON with precise error positions.
Developer & Security
SHA-1, SHA-256, SHA-384 and SHA-512 via the native Web Crypto API.
| Algorithm | Output | Status | Use for |
|---|---|---|---|
| MD5 | 128-bit / 32 hex | Broken | Legacy checksums only. Never for security |
| SHA-1 | 160-bit / 40 hex | Broken | Git object IDs, legacy compatibility |
| SHA-256 | 256-bit / 64 hex | Secure | The default choice for everything |
| SHA-384 | 384-bit / 96 hex | Secure | TLS certificates, higher margin |
| SHA-512 | 512-bit / 128 hex | Secure | Faster than SHA-256 on 64-bit CPUs |
MD5 and SHA-1 are broken in a specific sense: practical collision attacks exist. Two different files can be constructed with the same MD5 — this was demonstrated in 2004 and can now be done in seconds. SHA-1 fell to the SHAttered attack in 2017. Both remain fine for detecting accidental corruption, where nobody is deliberately constructing a collision, and both are unsuitable for anything where an adversary chooses the input.
Drop the file here, read the SHA-256, and compare it to the checksum published by the source. If they match character for character, the file is byte-identical to what was published.
This catches two distinct problems. Accidental corruption — a truncated download or a bad disk sector — changes the hash and is caught immediately. Deliberate tampering, where someone substitutes a modified installer on a mirror, is also caught, provided the checksum itself came from a trustworthy channel.
That proviso is the whole game. A checksum published on the same page as the download, over the same connection, protects against corruption but not against an attacker who controls that page. This is why signed releases and GPG signatures exist, and why Linux distributions publish checksums signed with a key you can verify independently.
Not by computation. Hash functions are one-way by design — SHA-256 compresses arbitrary input into 256 bits, so information is necessarily destroyed and the original cannot be reconstructed.
What can be done is guessing. A "hash cracker" hashes billions of candidate inputs and looks for a match. Against a short password from a predictable distribution, this succeeds quickly: a rainbow table or a GPU rig covers the entire space of eight-character passwords in hours.
This is exactly why passwords must never be stored as a plain SHA-256. Password storage needs a slow, salted, memory-hard function — Argon2id, scrypt, or bcrypt — which are deliberately expensive to evaluate and defeat precomputation. A general-purpose hash is designed to be fast, which is precisely the wrong property.
A one-bit change in the input flips roughly half the output bits, unpredictably. Hash "hello" and "hellp" and the two SHA-256 values share no visible relationship.
This is what makes hashes useful for integrity checking. There is no partial similarity to exploit and no way to tell from two hashes whether their inputs were nearly identical or completely different.
It also explains why you cannot use a cryptographic hash for fuzzy matching or deduplication of similar files. Perceptual hashes and locality-sensitive hashes exist for that, and they are built on deliberately opposite properties.
For detecting accidental corruption, yes. For anything security-related, no — practical collisions have been demonstrated since 2004 and can be generated in seconds.
It operates on 64-bit words, which matches the register width of modern CPUs. On 64-bit hardware it can be 30–50% faster despite producing a longer digest.
Yes. Files are read in chunks and hashed incrementally, so multi-gigabyte files work without exhausting memory.
Usually a text encoding difference or a trailing newline. This tool hashes UTF-8 bytes exactly as entered; command-line echo adds a newline unless you pass -n.
No. Use Argon2id, scrypt or bcrypt. General-purpose hashes are fast by design, which makes brute-forcing them cheap.
Random data added to an input before hashing so identical passwords produce different hashes. It defeats rainbow tables and forces an attacker to crack each entry separately.
No. Web Crypto runs in your browser and reads the file with the File API.