Document & File Tools

File Hash Comparator

Find out whether two files are exactly the same, without opening them. Drop two files, or one file and a published checksum, choose SHA-256, SHA-512, SHA-1 or MD5, and both files are hashed in your browser with streaming, so even multi-gigabyte files work. You get both hashes, a clear identical or different verdict, and for different files the position of the first byte that differs.

  • Runs in your browser
  • No sign-up
  • Free to use
File A
    File B (or enter a hash below)

      How to use File Hash Comparator

      1. Drop File A.
      2. Drop File B, or paste the expected hash for File A.
      3. Choose the hash algorithm.
      4. Click Compare and read the verdict.

      File Hash Comparator features

      Two modes

      File against file, or file against a published checksum.

      Four algorithms

      SHA-256, SHA-512, SHA-1 and MD5.

      Any size

      Streamed in 4 MB slices with progress.

      First difference

      Byte offset where two different files diverge.

      Tolerant input

      Accepts hashes with prefixes, spaces or upper case.

      Private

      Nothing is uploaded.

      When to use File Hash Comparator

      • Checking that a copied or backed-up file is intact.
      • Verifying a download against the vendor’s SHA-256 checksum.
      • Confirming that two versions of a binary are really different.
      • Investigating where a corrupted file starts to differ.

      File Hash Comparator FAQ

      How does comparing hashes prove two files are identical?

      A cryptographic hash changes completely if even one bit changes. Two files with the same SHA-256 hash are, for all practical purposes, identical.

      Which algorithm should I use?

      SHA-256 is the standard choice. MD5 and SHA-1 still detect accidental corruption but can be deliberately forged, so they are not suitable for checking against tampering.

      What does the first difference tell me?

      The byte offset where the files start to differ. A difference near the end often means a truncated or appended file; near the start, a different format or header.

      Can I check a download against a checksum?

      Yes. Drop the file as File A and paste the published hash into the expected-hash field. Prefixes such as “sha256:” and file names after the hash are ignored.

      How large can the files be?

      There is no fixed limit; files are read in slices. Very large files simply take longer.

      Are my files uploaded?

      No. Hashing happens in your browser.

      Comparing files with hashes

      Deciding whether two files are identical by looking at them is unreliable: sizes can match while contents differ, and names and dates say nothing about the bytes. A cryptographic hash condenses a file of any size into a short fingerprint that changes completely when anything in the file changes, which makes comparing two fingerprints a reliable test of identity.

      The comparator reads each file in slices of four megabytes and feeds them to the chosen hash function, so memory use stays low even for very large files. When the two hashes differ, the files are compared byte by byte up to the first difference, and its position is reported. Comparing hashes first means identical files are confirmed without a second full pass.

      Checking against a published checksum works the same way with one file. Software publishers, Linux distributions and backup tools often list SHA-256 hashes for their files; paste the value and the tool tells you whether the file matches. Common decorations, such as an algorithm prefix, a trailing file name, spaces or upper-case letters, are ignored, and a hash of the wrong length is pointed out.

      Algorithm choice matters for security. SHA-256 and SHA-512 are current standards. MD5 and SHA-1 are still widely published and are fine for detecting accidental corruption, but attackers can craft different files with the same MD5 or SHA-1 hash, so they should not be relied on to detect tampering. Comparisons are done in constant time, a detail that matters for secrets more than files, but costs nothing.

      All hashing runs in your browser. To compute hashes for many files at once, use the File Checksum Calculator; to find duplicates in a whole folder, use the File Duplicate Finder.

      Other useful tools