Text Diff Checker
Compare two texts side by side or unified, with changed words highlighted and a patch git can apply.
Text Diff
Original
Changed
Differences
Paste text or open a file 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 matches lines that appear once on each side first, as git’s patience diff does, then uses the Myers shortest-edit algorithm (git’s default) between them — which keeps moved blocks and code readable, and stays fast on long files.
How to use it
- Paste the original text on the left and the changed text on the right.
- Read the differences below — side by side on a wide screen, or unified in one column: removed lines in coral, added lines in green, changed words underlined. A hatched gap means that side has no line there.
- Jump between changes with the arrows beside the count, or press N and P while the result has focus.
- 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.
- Download or copy the result as a patch, 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 500,000 lines, pasted or opened from a file of up to 100 MB. The comparison runs in a background worker, so typing stays smooth and Cancel stops it; a file larger than 1 MB is shown as a card rather than in the box. Lines that appear once on each side are matched first, as git’s patience diff does, so long files with many scattered edits still compare quickly; where a stretch is completely rewritten, it is shown as removed then added rather than matched line by line.
- Line endings (Windows CRLF or Unix LF) and a missing line break at the end of the file are not shown as changed lines. They are reported in a note under the result instead.
- Word highlighting is shown for lines up to 1,000 characters; longer changed lines are marked as a whole.
- The patch is a standard unified diff (---/+++ lines, @@ hunks, three lines of context) that git apply and patch accept. It is not offered while whitespace or case is ignored, or when the two sides use different line endings, because lines matched that way are not the same bytes and the patch would not apply.
- 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, but JSON Diff is the better tool: it compares the values rather than the lines, so key order and spacing don’t show as changes. Here, format both first with the same indentation and sorted keys.
Is this the same as git diff?
It uses the same algorithms — Myers, anchored on unique lines like git diff --patience — so it usually marks the same lines, and the patch it downloads is in the same unified format, with “No newline at end of file” where a side ends without one. Hunks may be grouped differently from git’s, which doesn’t matter when applying them.
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.