Text Diff
Paste the original and the changed text (or load two files) to see exactly which lines were added, removed or kept, side by side or as a unified diff.
- Runs in your browser
- Free to use
About this tool
Which lines changed between two versions of a config, a script or a document? The Text Diff compares both texts in your browser with the Myers algorithm used by git, shows the result side by side or unified with line numbers and green/red highlighting, counts the changes, can ignore whitespace and case, and exports a unified diff you can paste anywhere. The full-screen mode gives long files the whole display.
Related: Compare Two Lists for set-style comparisons.
How to use it — quick steps
- 01
Add the two versions
Paste the original on the left and the changed text on the right, or load each one from a file.
- 02
Choose the options
Ignore whitespace or case if only real content changes matter, and pick side-by-side or unified view.
- 03
Press "Compare texts"
Added lines are green, removed lines red; the summary counts them and [copy unified diff] exports them.
Key features of this tool
Line-level diff
A Myers diff, the same algorithm behind git, finds the minimal set of added and removed lines, with line numbers for both sides.
Two views
Side by side to read both versions together, or unified with +/− markers to paste into a ticket or commit message.
Private
Configs, code and contracts are compared in your browser; nothing is uploaded.
Frequently asked questions
Does it highlight changes inside a line?
The diff works per line: a changed line appears as one removed and one added line. Enable "Ignore whitespace" to skip indentation-only changes.
Which files can I compare?
Any text: source code, configuration files, logs, CSV, JSON, contracts. Load each side with [load from file].
Is there a size limit?
Texts of a few thousand lines compare instantly; extremely different very large files fall back to a simpler comparison.
Are my files or data uploaded?
No. The tool is plain JavaScript that runs in your browser; the files or data you provide here are never uploaded to our servers.