Text Compare
See exactly what changed between two versions.
- 100% freeNo account, no daily quota, no paid tier.
- Nothing is uploadedFiles are processed on your device and never reach a server.
- No catch on the outputNo watermark, no forced downscaling, no size cap.
- Updated in the openEvery fix and every new tool is written down on the changelog page.
What this tool does
Paste one version on the left and the other on the right — which side is which is up to you — or drop a file onto either box, and the differences appear in the same place the boxes were: removed lines tinted red on the left, added lines tinted green on the right, and inside a changed line the exact words that differ are marked. The line-level comparison uses the same approach as git: unique lines anchor the two versions, and the Myers algorithm fills in the gaps, so a 100,000-line log with a handful of edits is compared in a fraction of a second on your own device.
Two views, three precisions. Side by side puts the versions in two columns with their own line numbers; Unified is the single-column format that git and code review tools use, with − and + prefixes. Precision decides how a changed line is highlighted: Line marks the whole line, Word marks the words that differ (the default), Character marks single characters — the right choice for hashes, identifiers and numbers. Nothing leaves your browser: no upload, no saved link, no account.
How to use it
Type or paste into the two boxes, or click Choose file on either side; the file's name then shows in that side's header and in the diff header, so you never have to remember which file went where. The result replaces the boxes; Edit brings them back, and double-clicking a line in the result jumps straight to that line for editing. Swap exchanges the two sides, Load sample fills both with a short configuration so you can see what a result looks like. The bar under the boxes holds the switches: Ignore case treats A and a as the same; Ignore whitespace collapses runs of spaces and tabs and ignores leading and trailing blanks, which is what you want for reformatted code; Only changes folds runs of identical lines down to three lines of context on each side, with a bar you can click to unfold them.
The line above the result counts added and removed lines and the number of change blocks. ‹ › jump from one block to the next — n and p do the same from the keyboard when the result has focus — and the block you land on gets a yellow marker in its line-number column. Copy diff puts a standard unified diff on the clipboard; Download .diff saves the same text as a file that git apply or patch can consume. Texts over 2 MB in total switch to a Compare button instead of updating on every keystroke.
Which files it can compare
Anything that is text underneath. Documents and notes: .txt, .md, .rtf as plain text, and .srt or .vtt subtitle files. Data exports: two JSON files, two CSV or TSV files, XML and YAML — a quick way to see what changed between two API responses or two database dumps. Configuration: .ini, .toml, .env, .properties, .conf, a Dockerfile, an nginx or Apache config, so the setting that broke a deployment stands out. Source code in any language: .js, .ts, .py, .go, .java, .c, .cpp, .rs, .php, .sql, .sh, plus .html and .css. Patches and logs: .diff, .patch, .log. Word, PDF and Excel files are not text — their content is packed inside a binary container — so they are refused here rather than shown as garbage; export them to plain text or CSV first.
Things worth knowing
A diff is a choice, not a fact: when a block of lines could be explained as moved, or as deleted and re-added, any algorithm picks one reading, and two tools can show the same edit differently. This tool prefers the reading that keeps unique lines aligned, which matches what people expect from git. Ignore whitespace compares lines with blanks collapsed but still shows the original spacing in the result. Very long single lines — a minified JavaScript bundle, a one-line JSON export — are compared as whole lines above 4,000 characters, because word-by-word comparison of a 200 KB line tells you nothing you can read. The result table shows up to 8,000 rows; beyond that, use Only changes or download the .diff, which is always complete. Files are checked before loading: anything with binary content, or over 20 MB, is refused with a message rather than rendered as garbage.
Background: where diff comes from
The diff program shipped with Unix in 1974, written by Douglas McIlroy and James Hunt, and its output format — lines prefixed with < and > — is still what the diff command prints. The unified format with − and + prefixes and @@ hunk headers was introduced by Wayne Davison in 1990 and adopted by GNU diff; it became the language of patches: it is what git show, GitHub pull requests and every code review tool display. Eugene Myers published the O(ND) difference algorithm in 1986; it finds the shortest edit script and is the core of GNU diff, git and most editors. Bram Cohen described the patience variant in 2004 — anchor on lines that appear exactly once on each side, then diff the gaps — because it produces results people find easier to read on real code. This tool uses patience anchoring with Myers inside the gaps, and writes the unified format for copy and download.
Where it is used
Checking what a colleague changed in a contract or a policy document before signing off; comparing two exports of a configuration to find the setting that broke deployment; diffing two log files from a working and a failing run; reviewing a generated file against the previous version; verifying that a translation kept every line of the source. For counts rather than differences, Word Counter reports words, characters and reading time; for text that only differs in script, Chinese Converter converts between Simplified and Traditional before you compare. A .diff downloaded here applies with git apply or patch on any system.
Frequently asked questions
Is my text uploaded anywhere?
No. The comparison runs in your browser and nothing is sent, saved or linked. Close the tab and it is gone.
What does Ignore whitespace do exactly?
Runs of spaces and tabs count as one space and blanks at the start and end of a line are dropped when lines are compared. The result still shows the original spacing. Indentation-only changes disappear from the diff.
Can I compare two files instead of pasting?
Yes. Click Choose file on each side or drop a file onto the box. Any text file works — .txt, .md, .json, .csv, .log, source code. Binary files and files over 20 MB are refused.
Which file types can I compare?
Any text file: .txt, .md, .json, .csv, .xml, .yaml, .ini, .env, .log, .diff, and source code in any language. Word, PDF and Excel are binary containers and are refused — export them to plain text or CSV first.
What is the .diff I can download?
A standard unified diff, the format git and patch use. git apply changes.diff on the original file produces the changed version.
Why does the highlighting move when I switch to Character?
Word precision marks whole words; Character precision marks the individual characters that differ. On a changed identifier or hash the character view is tighter; on prose, word is easier to read.