How to use the Diff Checker
- Paste the original on the left and the changed version on the right, or drop a file onto either box.
- Pick a view: side by side, unified (like Git) or inline.
- Use Prev and Next (or the N and P keys) to jump from change to change.
- Optionally ignore case, spacing or blank lines, then copy the diff or download it as a .patch file.
What does this tool do?
The checker compares line by line with Myers' algorithm — the method Git uses — so it finds the smallest set of changes rather than flagging everything after the first edit. When a line was edited rather than replaced, it's shown as a single modified line and the exact words (or characters) that changed are highlighted, which makes small edits in long lines easy to spot.
It works for any text: contracts and essays, source code, logs, CSV and config files. Files are read in your browser as UTF-8; Windows (CRLF) and Unix (LF) line endings are treated as equal, and the tool tells you when they, a final newline or a byte-order mark are the only differences. Long unchanged stretches are folded so the changes stand out, and very different or very large files fall back to a patience-style alignment instead of failing.
The downloadable patch is a standard unified diff of the real texts, so it can be applied with git apply or patch even when ignore options are switched on for display.
Why use it?
- Side-by-side, unified and inline views, with aligned line numbers.
- Word- or character-level highlights inside modified lines.
- Counts of added, removed, modified and unchanged lines.
- Drag-and-drop files; nothing is uploaded.
Use cases
- Check what changed between two versions of a contract, policy or essay.
- Review code or configuration changes without a Git repository.
- Compare two log files or exports to find the lines that differ.
Example
Comparing two drafts of a project plan (click “Try an example”) gives:
| Line | Change | Shown as |
|---|---|---|
| Project plan — version 1 → 2 | Modified | Only the version number highlighted |
| Launch the beta in March → April | Modified | Only “March” / “April” highlighted |
| Hire one designer → Hire two designers | Modified | “one designer” / “two designers” highlighted |
| Publish a help centre | Added | Green line on the right |
| Status: draft | Removed | Red line on the left |
Accuracy and limits
- Binary files such as images, PDFs and Word documents can't be compared as text. Use File Compare to check whether two binary files are identical, or Compare PDFs for PDF text.
- Inputs over about 1.5 million characters are compared when you press Compare rather than on every keystroke, so typing stays responsive.
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Frequently asked questions
Can I compare two files?
Yes. Click Open file above either box or drag a file onto it. Any text-based file works: .txt, .md, .csv, .json, .xml, .html, .js, .py, .sql, .log and so on, up to 25 MB each.
What do “modified” lines mean?
A removed line and an added line that are mostly the same are paired as one modified line, and only the words that differ are highlighted. Lines that are completely different are shown as a removal plus an addition.
What does “ignore spaces and tabs” do?
Runs of spaces and tabs count as a single space, and spaces at the start and end of lines are ignored. Useful when only indentation changed.
Is there a JSON or CSV mode?
For structured data, use JSON Diff (compares properties by path) or CSV Compare (matches rows by an ID column). They avoid false differences caused by formatting, key order or row order.
Last reviewed by the M2Toolkit team.