File Compare

Drop two files to compare their SHA-256 hashes and, for text files, see a line-by-line diff — all locally in your browser.

File A

Drop a file here or

Max 5.00 MB

File B

Drop a file here or

Max 5.00 MB

SHA-256 verification

Every file is hashed with SHA-256 so you can confirm two files are byte-for-byte identical with cryptographic certainty.

Line-by-line text diff

Text files get a full split or unified diff with line numbers, ignore-whitespace mode, and a downloadable .diff export.

Never uploaded

Files are read, hashed, and diffed in your browser. Nothing leaves your device — safe for private builds, configs, and exports.

How file comparison works

When you drop a file, the tool reads its bytes with the File API and runs a SHA-256 hash using the browser's built-in Web Crypto API. Matching hashes prove that the files are identical down to the last byte. If the hashes differ and both files look like text, the tool tokenises them by line and runs a longest-common-subsequence (LCS) algorithm to produce a minimal set of additions, deletions, and replacements.

Typical use cases

  • Verifying that a downloaded installer matches the vendor's published checksum.
  • Confirming that a build artifact is reproducible across machines.
  • Spot-checking two versions of a configuration file before deployment.
  • Comparing two exported reports, CSVs, or backups for unexpected changes.
  • Auditing whether a binary asset (image, PDF) has been modified.

Frequently asked questions

What does the File Compare tool do?

It takes two files, computes a SHA-256 hash of each, and tells you whether their bytes are identical. For text files, it also shows a line-by-line diff in side-by-side or unified view so you can see exactly what changed.

Are my files uploaded anywhere?

No. Files are read with the browser's File API, hashed with the Web Crypto API, and diffed entirely in memory. Nothing is sent to a server, logged, or stored.

What file types are supported?

Any file. Text files (source code, JSON, CSV, Markdown, configuration, logs, etc.) get a full line diff. Binary files (images, PDFs, executables, archives) are compared by SHA-256 hash only, since a text diff would be meaningless.

How does it know if a file is binary?

It scans the first 8 KB for NUL bytes and a high proportion of non-printable control characters. If either signal is present, the file is treated as binary and only the hash comparison is shown.

Why use SHA-256?

SHA-256 is a cryptographically strong hash. If two files share the same SHA-256, they are byte-for-byte identical with overwhelming certainty. It is the same algorithm used by Git, package managers, and OS vendors to verify file integrity.

What is the maximum file size?

5 MB per file. This keeps the diff fast and responsive in the browser. For very large files, a command-line tool such as diff, cmp, or sha256sum is more appropriate.

What is the difference between split and unified view?

Split view shows file A on the left and file B on the right, side by side. Unified view stacks additions and deletions in a single column with + and − prefixes, like the output of git diff.

What does 'Ignore whitespace' do?

It normalises lines by stripping spaces, tabs, and other whitespace before matching, so re-indentation or trailing-space changes do not appear as diffs.

Can I download the diff?

Yes. Use the Copy diff or Download buttons to save a standard unified diff (.diff) that you can share, attach to a code review, or apply with the patch utility.

How is this different from the Diff Checker?

The Diff Checker is for pasting text directly. File Compare lets you upload two files, shows file metadata (name, size, SHA-256), detects binary content, and is optimised for verifying downloads, builds, and exported documents.

Part of our growing tool belt — all client-side, all free.