What Is File Compare?
File Compare lets you upload two files and instantly see exactly how they differ - without installing any software or uploading anything to a server. If both files are plain text (source code, config files, logs, CSV, JSON, markdown, and similar), it renders a familiar line-by-line diff showing what was added and removed.
If either file isn't text - an image, archive, executable, or any other binary format - a full line diff wouldn't make sense, so the tool instead shows a comparison summary: filename, size, MIME type, last-modified date, and a SHA-256 hash for each file, with a clear Identical/Different verdict.
How the Comparison Decides Text vs. Binary
Each uploaded file is read as raw bytes. The tool first scans for a null byte - a strong signal of binary content - then attempts a strict UTF-8 decode; a file with neither problem counts as text immediately, no matter what its extension is. Only if that strict decode fails does the file's extension get checked against a list of common text formats (.txt, .md, .json, .csv, .js, .css, .html, .xml, .log, .yml, .py, .java, .c, .sql, and more) - a matching extension earns the file one more attempt with a more lenient decode.
Only when both files pass as text does the tool run its longest-common-subsequence line diff, the same underlying technique used by Git and other version control diffing. Otherwise it falls back to the byte-level summary table, computed with the browser's native crypto.subtle.digest SHA-256 implementation, so you still get a reliable way to confirm whether two files are truly identical.
Why Use This File Compare Tool
Frequently Asked Questions
No. Both files are read locally using the browser's File API and never leave your device - there is no upload, no server processing, and no storage.
It scans each file for a null byte and attempts a strict UTF-8 decode; a file with no null byte that decodes cleanly counts as text right away. If the strict decode fails, the file's extension is checked against a common text-file list as a fallback. Only when both files come back as text do you get a line-by-line diff - otherwise you get a summary table with hashes.
Each file's full contents are hashed with SHA-256 using the browser's native Web Crypto API. If the two hashes match exactly, the files are byte-for-byte identical; if they differ at all, the files are different.
Yes. Since both files must decode cleanly as text for a line diff to run, mixing a text file with a binary one automatically falls back to the summary table view instead.