Verify file integrity with our SHA-256 Hash Generator. Compare checksums locally without uploading files to any server.
The corrupted download
You just downloaded a 2 GB Linux ISO. You write it to a USB drive, boot your machine, and it fails with cryptic errors an hour into the installer.
The likely culprit: a single flipped bit during download. A broken mirror, a flaky connection, or a proxy that truncated the stream can corrupt a file that otherwise looks fine.
This is what checksums exist for. A SHA-256 hash is a fingerprint of the file: any change to the input, however small, produces a completely different hash. Verify the fingerprint before you use the file, and the failure mode disappears.
What is SHA-256?
SHA-256 is a cryptographic hash function standardized in FIPS 180-4. It takes any input - text, files, firmware - and produces a fixed 64-character hexadecimal digest.
Three properties make it right for integrity checking: it is deterministic (same input, same output), one-way (you cannot recover the input from the digest), and avalanche-sensitive (changing one bit changes roughly half the output bits).
A matching hash proves the file is byte-for-byte identical to what the publisher hashed. It does not, by itself, prove who hashed it or that the checksum was not tampered with - that is what signed checksums add.
Where SHA-256 is used
SHA-256 appears everywhere in modern computing:
- Software distribution - Linux distributions publish SHA-256 hashes for all ISO and package downloads
- Package managers - npm, pip, and apt verify artifact integrity
- Git version control - commits and objects are identified by SHA-1 (with SHA-256 object format now supported)
- SSL/TLS - certificates are fingerprinted with SHA-256
- Backup systems - deduplication and integrity checks
- Blockchain - Bitcoin uses SHA-256 to link blocks
How to verify file integrity
- Get the expected hash from the official website, over HTTPS - never from forums, mirrors, or search results.
- Generate the hash of your downloaded file, using a browser tool or one of the commands below.
- Compare the two values character by character, or with a compare field built into the tool.
- If they match, use the file. If they do not match, delete the file and download it again from an official mirror.
- For high-value downloads, additionally verify the checksum file's GPG signature (see below).
SHA-256 commands by platform
Here is how to generate SHA-256 hashes on different platforms:
Windows (PowerShell)
Get-FileHash filename.iso -Algorithm SHA256# Or using certutil:certutil -hashfile filename.iso SHA256Mac and Linux
sha256sum filename.iso# Or on Mac without sha256sum:shasum -a 256 filename.isoJavaScript (Web Crypto API)
async function hashFile(file) { const buffer = await file.arrayBuffer(); const hashBuffer = await crypto.subtle.digest('SHA-256', buffer); const hashArray = Array.from(new Uint8Array(hashBuffer)); return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');}Verifying against a checksums file
Instead of copying a hash from a web page, you can download the distribution's checksums file - typically named SHA256SUMS - and verify all your files in one command.
The file lists hash + filename pairs. The -c (check) mode reads that file, hashes each listed file, and reports OK or FAILED for every entry.
This is both faster and safer than eyeballing hashes, because the comparison is exact and covers every file at once.
# Download the checksums file next to your ISO, then:sha256sum -c SHA256SUMS# Expected output for each listed file:# ubuntu-24.04-desktop-amd64.iso: OKSigned checksums: defending the checksum itself
A checksum is only as trustworthy as its source. If an attacker can replace the ISO on a mirror, they can replace the SHA256SUMS file next to it too - so a checksum from an untrusted source proves nothing.
Major distributions therefore sign the checksums file with GPG. The workflow: import the distribution's official signing key (over HTTPS), verify the signature on SHA256SUMS, and only then trust the hashes inside it.
This turns a single point of failure into two verifiable steps: the signature proves the checksums came from the publisher, and the checksums prove the files came from the publisher.
# Example with Ubuntu-style releases (adjust filenames per distribution)gpg --verify SHA256SUMS.gpg SHA256SUMSsha256sum -c SHA256SUMSAutomating checksum verification
For teams and power users, verification belongs in the pipeline, not in memory:
CI jobs should verify downloaded artifacts against a pinned checksum before building or testing
Scripts should fail hard on mismatch - a silent retry can hide a supply-chain problem
Keep the expected hashes in a signed, versioned manifest, not in a README
Verify images before writing to USB or SD cards, not after a failed boot
SHA-256 vs other algorithms
Use SHA-256 for all new integrity work. It is secure, universally supported, and recommended by NIST transition guidance.
SHA-1 is broken for collision resistance - researchers have demonstrated real collisions. Do not rely on SHA-1 for security.
MD5 is completely broken for security. It is fine as a fast non-security checksum for deduplication, but never for integrity against a motivated attacker.
SHA-512 offers a larger digest and is faster on 64-bit CPUs, but SHA-256 is the ecosystem standard - publishers list it, and tooling expects it.
What hashes cannot do
A hash proves a file has not changed since it was hashed. It does not prove who created it, when, or that the hash source was legitimate.
Proving authorship requires digital signatures - public-key cryptography over the hash, as in the signed-checksums workflow above.
And hashes do not provide confidentiality. Hashing a password produces a deterministic value that attackers can brute force; passwords need slow, salted KDFs such as Argon2id, scrypt, or bcrypt, never plain SHA-256.
Frequently Asked Questions
Q.Can two files have the same SHA-256 hash?
A.In theory, yes - that is a collision. In practice, SHA-256's 256-bit output space makes finding a collision computationally infeasible; none has ever been found. The hash space is 2^256, larger than the number of atoms in the observable universe.
Q.Why is SHA-256 fast, and is that good?
A.SHA-256 is fast by design, using bitwise operations optimized for modern CPUs. That is excellent for file verification. For password hashing, speed is a disadvantage because attackers can test billions of guesses per second - use bcrypt, Argon2, or PBKDF2 for passwords.
Q.How do I verify a file hash on Windows?
A.Open PowerShell and run Get-FileHash filename.iso -Algorithm SHA256, or certutil -hashfile filename.iso SHA256. Compare the output character by character with the official hash. For a no-install alternative, use a browser tool that hashes locally.
Q.What if my hash does not match?
A.The file is corrupted or was modified - even one bit changes the entire digest. Delete it and download again from an official mirror, ideally over HTTPS. If the mismatch persists, verify the checksum source and check your download tool for truncation.
Q.Is SHA-256 still secure in 2026?
A.Yes. SHA-256 has no known practical vulnerability and remains the NIST-recommended workhorse. SHA-3 exists as a newer, structurally different alternative, but for integrity checking SHA-256 is perfectly adequate and expected by the ecosystem.
Q.Can I use SHA-256 for password storage?
A.No. SHA-256 is too fast, allowing billions of guesses per second, and it is unsalted by default, enabling rainbow-table attacks. Use Argon2id, scrypt, or bcrypt - slow, salted, memory-hard where possible.
Q.Can I hash text strings, not just files?
A.Yes. SHA-256 works on any data. For text, the digest depends on the exact encoding (UTF-8 vs ASCII) and whether a trailing newline is included - state the exact format when sharing hashes.
Q.Can SHA-256 be reversed or decrypted?
A.No. SHA-256 is one-way by design; you cannot recover the input from the digest. The only attack is guessing inputs and comparing digests, which is impractical for high-entropy inputs and exactly why passwords need slow KDFs instead.
References
This article is based on industry standards and best practices from authoritative sources:
- NIST FIPS 180-4 - Secure Hash Standard (SHS): https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
- NIST SP 800-131A Rev.2 - Transitioning the Use of Cryptographic Algorithms and Key Lengths: https://csrc.nist.gov/publications/detail/sp/800-131a/rev-2/final
- RFC 6234 - US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF): https://www.rfc-editor.org/rfc/rfc6234
- OWASP Cryptographic Storage Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html
Verify files with SHA-256
Generate and compare hashes for text or files entirely in your browser.
Conclusion
A few seconds of checksum verification can save you from installing a corrupted or tampered file - and signed checksums close the last trust gap.
Verify every ISO and firmware image the same way: fetch the official hash over HTTPS, compare it locally with the SHA-256 Hash Generator, and treat any mismatch as a reason to discard the file.