Text Diff Checker
Compare two texts line by line, with changed words highlighted and a copyable diff.
Original
Changed
Differences
Paste text on both sides to compare them line by line.
Runs in your browser — nothing you enter leaves this device.
About this tool
What it does
The diff checker compares two versions of a text — a contract clause, a config file, an essay draft, two API responses — and shows exactly what changed. Lines that were removed are marked with a minus, added lines with a plus, and when a line was edited rather than replaced, the words that differ are highlighted inside it. It uses the Myers shortest-edit algorithm, the approach Git uses by default, so the result is the smallest set of line changes that turns one text into the other.
How to use it
- Paste the original text on the left and the changed text on the right.
- Read the differences below: removed lines in coral, added lines in green, changed words underlined.
- Turn on “Ignore whitespace” to skip indentation and spacing changes, or “Ignore case” to treat capitals as equal.
- Choose “Changes only” to hide unchanged lines except two lines of context around each change.
- Copy the result as a plain diff, or swap the two sides to see the change in reverse.
Limits and your data
- The comparison is line by line. A paragraph re-wrapped onto different lines will show as changed even if the words are the same; ignoring whitespace doesn’t join lines.
- Each side can have up to 20,000 lines. Texts that differ in more than about 4,000 lines are reported as too different rather than producing an unreadable result.
- Word highlighting is shown for lines up to 1,000 characters; longer changed lines are marked as a whole.
- The copied diff isn’t a patch file with hunk headers, so tools like git apply won’t accept it.
- It compares text only. Word documents and PDFs need their text copied out first.
- Both texts are compared in your browser. Nothing is uploaded or saved, so it’s suitable for private documents and unreleased code. Reloading the page clears them.
Questions
Why is a whole line marked as changed when I only changed one word?
The line is the unit of change, as in Git. Inside that line the specific words are underlined, so you can still see exactly what was edited.
Can I compare two JSON files?
Yes. Format both first with the JSON Formatter using the same indentation and sorted keys, then compare — otherwise differences in spacing or key order will show as changes.
Is this the same as git diff?
It uses the same kind of algorithm and will usually give the same lines. Git adds options such as the patience and histogram algorithms and produces patch files; this tool is for reading changes quickly.
Does it work with Hindi and other languages?
Yes. Text is compared as Unicode, and word highlighting keeps vowel signs and other combining marks attached to their words.