Finding what changed between two versions of a document by reading both is slow and unreliable — the eye skips over small differences, which are exactly the ones that matter. A diff does the comparison mechanically and shows only what moved.
How to use the Text Diff Checker
- Paste the original text into the first box
- Paste the version you want to compare into the second
- Click Compare
- Read the highlighted result — green is added, red is removed
Reading a diff
- Green, prefixed + — lines present in the second text but not the first. Additions.
- Red, prefixed − — lines present in the first but not the second. Removals.
- Unmarked — identical in both.
An edited line normally shows as a removal immediately followed by an addition, because line-level diffing has no concept of a line being modified — only of one line disappearing and another appearing.
What a line diff will and will not catch
This compares whole lines. Change a single character and the entire line is flagged, which is correct but coarse: you still have to spot the character yourself.
It also means formatting changes can swamp the real differences. Re-wrapping a paragraph changes every line in it even when not a word has changed. If you are comparing prose, put each sentence on its own line first, and the diff becomes far more readable.
Making diffs readable before you need them
Most unreadable diffs are caused by the source format rather than the comparison. Two habits fix nearly all of it.
One sentence per line. In any plain-text format you control — Markdown, documentation, config comments — ending each sentence with a newline means an edit produces a diff naming the sentence that changed. Rendered output is unaffected, since Markdown joins consecutive lines into a paragraph. The alternative, one long line per paragraph, means every edit reports the whole paragraph.
Separate formatting changes from content changes. Reindenting a file and editing it in the same pass produces a diff where every line is modified and the real change is invisible. Do them as two steps.
When a diff looks implausibly large, suspect the invisible before the visible: line endings converted between Windows and Unix, tabs changed to spaces, or a trailing newline added at the end of the file. All three mark every line as changed while the text is identical.
Confirming two things are identical
The under-used direction of a diff is proving that nothing changed. The eye is poor at this — people routinely confirm two long strings match when they differ by one character.
It is worth doing whenever a copy is supposed to be exact: a configuration file against a known-good reference, a legal clause against the approved wording, a bank account number against a statement, a translated string against the source. An empty diff is a definite answer in a way that reading twice is not.
It also works as a quick integrity check on text pasted between systems. Copying through a rich-text editor silently converts straight quotes to curly ones and hyphens to en dashes, which breaks code and config in ways that are invisible on screen. A diff against the original shows them immediately.
One caveat: a diff compares what it is given. Trailing whitespace and a missing final newline are real differences that most editors do not display, so a diff reporting a change where you see none is usually right.
Comparing things that are not prose
A line diff works on anything line-based, and several non-prose comparisons are among its most useful applications.
Configuration files. Comparing a working config against a broken one usually finds the problem faster than reading either. The same applies to comparing environments — a staging config against production.
Dependency lists. Diffing two lockfiles, or two pip freeze outputs, shows exactly which package versions differ between a machine where something works and one where it does not.
Exported data. Two CSV exports taken at different times diff cleanly if the row order is stable. If it is not, sort both first — otherwise every line appears changed.
Minified assets. Diffing two builds tells you whether a deploy actually changed anything, though you will want to format both first or the whole file is one line.
Terminal output. Comparing the output of a command before and after a change isolates what the change did.
For all of these, normalising first — consistent sort order, consistent line endings, no trailing whitespace — is what separates a readable diff from a wall of red.
Frequently asked questions
Is my text uploaded to compare it?
No. The comparison runs entirely in your browser. Nothing is transmitted, so it is safe for contracts, credentials or unreleased code.
Why does one small edit show a whole line as changed?
This is a line-level diff — the unit of comparison is the line, so any change within a line marks the whole line. Character-level diffs are more precise but much noisier on real documents.
Can I compare two files rather than pasting?
Open each file, copy its contents, and paste. Direct file comparison is not supported here.
Does it ignore whitespace differences?
No — trailing spaces and changed indentation register as differences. That is often what you want when comparing code. For prose, normalise the whitespace first if it is creating noise.