Before version control, before Git, before pull requests — there was the file compare. The oldest debugging tool in software. Two files. A question: what changed?
That question still comes up every single day, in every kind of team, in situations that version control doesn't cover:
A colleague sends you two versions of a config file by email. A vendor delivers two revisions of a data export with no changelog. A deployment script exists in two locations and may have drifted. A CSV from last week needs to be compared against today's export to understand what records changed. A log file from a working environment needs to be compared against one from a broken environment.
Git can't help you here. Your IDE diff tool requires a project. Our file compare tool requires nothing — upload both files, see every difference instantly, side by side, with every added line in green, every removed line in red, and every modified line showing exactly what changed.
Every tool in our suite has a specialized purpose: JSON Compare understands data structures, XML Compare understands namespaces and element hierarchy, Text Compare handles pasted content. File Compare is the tool that covers everything else — and does it without requiring you to know the file type in advance.
.json, .xml, .yaml, .sql, .csv, .txt, .log, .env, .md, .html, .css, .js, .ts, .py, .java, .sh, .conf, .ini, .toml, .properties — if the file contains text characters that a text editor can open, our file compare tool can diff it.
The comparator makes no assumptions about the file's structure. It doesn't try to parse JSON or XML — it diffs lines. This is a feature, not a limitation: it means the tool never fails because of a format it doesn't recognize, and it works identically on every file type.
Added lines, removed lines, unchanged lines — the unified diff format that every developer already understands from git diff, from code review tools, from every terminal they've ever worked in. No learning curve. No new interface to understand. Just the diff.
Drag and drop or click to upload files from your device. Both files can be uploaded simultaneously — left panel for the original/reference file, right panel for the modified/new file. Files are read locally in your browser and never transmitted to our servers.
The comparator uses the Myers diff algorithm — the same algorithm used by Git, GNU diff, and virtually every professional diff tool. Myers diff finds the shortest edit distance between two sequences of lines: the minimum number of additions and deletions required to transform File A into File B. This produces the most natural, human-readable diff output — changes are grouped together, and unchanged sections are clearly identified.
git diff format with + and - prefixes. More compact, better for printing or copying the diff output.For modified lines (lines that exist in both files but with different content), character-level highlighting shows exactly which characters within the line changed — not just that the line is different, but which word, which value, which character. This is the detail that matters when a line changes a single field value, a single option, or a single flag.
Both panels display line numbers aligned with the original files, so you can navigate back to the exact location in your editor or terminal.
A summary at the top of the results shows the total number of additions, deletions, and modified lines — giving you an at-a-glance sense of the scale of changes.
While our file compare tool works on any text file, certain file types show up in file comparison workflows so consistently that they deserve specific attention.
Log comparison is one of the highest-value uses of file diffing that most developers never think to do systematically. When a service works in environment A and fails in environment B, comparing the startup logs from both environments is often the fastest path to the answer.
The diff immediately shows: the cache connection failed in the broken environment. That's your incident root cause, surfaced in seconds.
Environment configuration drift between deployment environments is responsible for a significant portion of bugs. The `.env` file that works in development has accumulated changes that never made it to staging. File Compare takes two `.env` files and shows you exactly which variables are missing or different.
`.conf`, `.ini`, `.toml`, `.properties`, `.cfg`. Apache virtual host configs. Nginx server blocks. PostgreSQL `postgresql.conf`. Redis `redis.conf`. All text files. All perfectly handled by line-by-line comparison across environments or versions.
Two exports of the same dataset from different dates or systems. File Compare is particularly effective for CSV when the first column is an identifier and rows are sorted consistently — changes to specific records are immediately visible.
Two versions of a README, a CHANGELOG, an API documentation file. Comparing them shows exactly what was added, changed, or removed — useful for changelog generation or content auditing.
Developers familiar with Git sometimes wonder when to reach for an online file compare tool versus using git diff in the terminal. The answer depends on context. The two tools are complementary, not competitive. Git diff owns version-controlled comparison. File Compare owns everything else.
git diff when:For teams that need programmatic file comparison beyond the one-off visual use case:
# Basic line-by-line diff
diff file1.txt file2.txt
# Unified format (like git diff)
diff -u file1.txt file2.txt
# Side-by-side comparison
diff --side-by-side file1.txt \
file2.txt
# Exit code:
# 0 = identical
# 1 = different
# 2 = error
# Useful in CI scripts:
if ! diff -q f1.txt f2.txt > /dev/null; then
echo "Files differ"
exit 1
fiimport difflib
with open('file1.txt') as f1, \
open('file2.txt') as f2:
lines1 = f1.readlines()
lines2 = f2.readlines()
# Unified diff output
diff = difflib.unified_diff(
lines1, lines2,
fromfile='file1.txt',
tofile='file2.txt',
lineterm=''
)
print('\n'.join(diff))
# HTML diff — visual, color-coded
html_diff = difflib.HtmlDiff()
html = html_diff.make_file(
lines1, lines2, 'File 1', 'File 2'
)const { createTwoFilesPatch } = require('diff');
const fs = require('fs');
const file1 = fs.readFileSync('f1.txt', 'utf8');
const file2 = fs.readFileSync('f2.txt', 'utf8');
const patch = createTwoFilesPatch(
'file1.txt', 'file2.txt',
file1, file2
);
console.log(patch);# Generate expected and actual outputs
./generate-config.sh --env=expected > exp.conf
./generate-config.sh --env=actual > act.conf
if diff -q exp.conf act.conf > /dev/null; then
echo "Config generation matches — OK"
else
echo "Config mismatch detected:"
diff exp.conf act.conf
exit 1
fiFile comparison tools handle sensitive data more often than any other category of developer tool. Config files contain database credentials. Log files contain user data. Environment files contain API keys. .env files contain secrets.
Our comparator processes everything locally in your browser. Files are read using the browser's FileReader API — the file bytes never leave your device, never transit a network, and never touch our servers. The comparison computation happens in JavaScript running in your browser tab.
Open your browser's network inspector (F12 → Network tab) while using the tool. You will see zero outbound requests containing your file data. The only network activity is loading the page assets — the JavaScript that runs the comparison locally.
For teams with strict data handling requirements — financial services, healthcare, government, legal — this architecture means our file compare tool is safe to use with production configuration files, sensitive logs, and data exports that would be inappropriate to send to a cloud service.
Any text-based file — files where the content can be opened and read in a plain text editor. This includes .txt, .log, .csv, .json, .xml, .yaml, .yml, .sql, .md, .html, .css, .js, .ts, .py, .java, .sh, .bash, .env, .conf, .ini, .toml, .properties, .cfg, and many more. Binary files (images, PDFs, compiled executables) cannot be meaningfully compared with a text diff tool.
There is no hard size limit — files are processed locally in your browser. Practically, very large files (50MB+) may be slow to process depending on your device's memory and processor. For most comparison tasks involving config files, log excerpts, and data exports, file sizes are well within comfortable limits.
Yes. If you prefer not to upload files, use our Text Compare tool, which accepts pasted content directly. File Compare is optimized for the upload workflow; Text Compare is optimized for pasted content.
No. File comparison is entirely client-side. Files are read by your browser's FileReader API and compared using JavaScript running locally. No file data is transmitted to our servers, stored, or logged. You can verify this with your browser's network inspector.
We use the Myers diff algorithm — the same algorithm used by Git, GNU diff, and most professional diff tools. It finds the shortest edit distance (minimum additions and deletions) between two files, producing the most natural and human-readable diff output.
Yes. You upload two files regardless of where they came from — one from your local machine and one from a download, from two different servers, from two different repositories. The tool doesn't care about file origin or path.
File Compare accepts uploaded files — you browse for and upload both files from your device. Text Compare accepts pasted content — you copy and paste text into two input panels. Both use the same line-by-line diff engine.
Binary files cannot be meaningfully compared with a text diff tool — their content is not human-readable text. For PDF content comparison, extract the text from both PDFs first and compare the extracted text. For image comparison, specialized pixel-level diff tools are needed.
Lines highlighted in green (or prefixed with +) are additions — present in the second file but not the first. Lines highlighted in red (or prefixed with -) are deletions. Lines with no highlighting are unchanged. In split view, the left panel shows the original file and the right panel shows the modified file, with blank lines inserted to align corresponding sections.
Yes. The diff output can be copied to clipboard or downloaded as a unified diff file (.diff or .patch format), which can be applied using the patch command on Unix systems or reviewed in any diff-aware tool.
Upload both files above — config files, log excerpts, data exports, scripts, anything text-based — and get a precise, line-by-line diff with character-level highlighting in seconds.