Text Diff
Compare two texts and highlight what was added and removed.
1 line
1 line
About this tool
Comparing two versions of a document by eye is slow and easy to get wrong. This tool aligns the two texts and marks exactly what was added and removed — line by line for edits across a file, or word by word when a single sentence changed.
Windows and Unix line endings are treated as equivalent, so pasting from different machines does not report every line as changed.
How to use it
- Paste the original text on the left and the changed text on the right.
- Choose line-by-line or word-by-word comparison.
- Press Compare and read the marked-up result.
Example
the quick brown fox the quick red fox
the quick -brown +red fox
FAQ
- Is my text uploaded anywhere?
- No. The comparison runs in your browser. Nothing is sent to a server, and this page has no analytics.
- What is the difference between line and word mode?
- Line mode reports whole lines as added or removed, which suits edits spread across a file. Word mode pinpoints the changed words inside a line, which suits a single edited sentence.
- Does it handle Windows line endings?
- Yes. CRLF and LF are normalised before comparing, so a file pasted from Windows is not reported as entirely different from the same file on macOS or Linux.
- How large can the texts be?
- Each side is limited to about 500,000 characters. Beyond that the comparison is refused rather than left to freeze the browser tab.
- Can I compare JSON with this?
- You can, but the JSON Diff tool is better for it: it compares parsed structures, so reformatting or reordering keys does not show up as a difference.