Text Diff. Every change, line by line.
Runs entirely in your browser, nothing is uploaded anywhere.
A diff you can trust, with no upload
Text Diff compares your two texts line by line using a longest-common-subsequence algorithm, the same core idea behind git diff. Lines only in the original are marked as removed (red); lines only in the changed version are marked as added (green); everything else lines up untouched with its real line numbers on both sides. Toggle Unified for a single stacked column or Side by side for two aligned panes, and switch on ignore-case or ignore-whitespace when trailing spaces or capitalisation shouldn't count as a change. Because the whole comparison runs in your browser, your content never leaves your device, good for code, config, contracts, essays or anything else you'd rather not paste into a server.
How to use Text Diff
Text Diff compares two versions of a text line by line and shows which lines were added, removed or left alone. It finds the longest run of lines the two versions share, the same idea git diff uses, and marks everything else as a change. It is for checking edits to code, config files, contracts, essays or any text where you need to see exactly what changed.
Step by step
-
Paste both versions
Paste the older text into Original and the newer text into Changed. To see how the tool works first, press Load sample, which fills both boxes and runs a comparison.
-
Choose what to ignore
Tick Ignore case if capital letters should not count as a change. Tick Ignore whitespace to treat runs of spaces and tabs as one space and to ignore spaces at the start and end of each line. Both are off at first.
-
Pick a view
Choose Unified for one column, like a Git patch, or Side by side for the two versions in aligned panes. Unified is selected first, and switching views redraws the result straight away.
-
Run the comparison
Press Compare. The result appears below with counts of added, removed and unchanged lines. If the texts match, a message says the two texts are identical.
-
Flip or start over
Press Swap to exchange the two boxes and compare in the other direction, so additions become removals. Press Clear to empty both boxes and hide the result.
Reading the result
- Green lines marked + exist only in Changed. Red lines marked with a minus sign exist only in Original. Unmarked lines are in both.
- The two number columns show each line's position in Original and in Changed. In Side by side, a hatched empty cell means the line has no partner on that side.
- A line that was edited shows up as one removed line followed by one added line. The tool compares whole lines, it does not highlight the changed words inside them.
- With the sample loaded the summary reads +3 added, 2 removed and 2 unchanged: two lines were reworded, one line was added at the end, and the first and last original lines are untouched.
Tips and common mistakes
- Press Compare again after ticking Ignore case or Ignore whitespace. The options apply on the next comparison, while switching the view updates at once.
- If nearly every line shows as changed, the two texts probably differ in indentation or line endings, for example a file saved on Windows against one saved on a Mac. Tick Ignore whitespace and compare again.
- The ignore options only affect how lines are matched. The result always shows your text exactly as you pasted it.
- Very long texts, thousands of lines in each box, can be slow or stall the tab, because the comparison builds a table as large as the two line counts multiplied together. Compare one section at a time if that happens.
Privacy and limits
The comparison runs entirely in your browser and works offline once the page has loaded. Neither text is uploaded or saved, so reloading the page clears both boxes.
Everything a diff should do.
- Compare any two texts line by line, code, config, documents, essays or plain notes, with every change highlighted.
- Read it your way in a stacked unified view or two aligned side-by-side panes, switchable any time.
- Spot additions and deletions instantly: green for added lines, red for removed, with real line numbers on both sides.
- Ignore case or whitespace so capitalisation or trailing spaces don't get flagged as real changes.
- Swap Original and Changed in one click to reverse the comparison direction and re-run instantly.
- Private by construction: the diff runs entirely in your browser, nothing is uploaded and it keeps working offline.
Frequently asked questions.
Is Text Diff free?
Is it private? Is my text uploaded anywhere?
What is the difference between Unified and Side by side?
+, removed lines with a −, like a Git patch. Side by side shows the original and changed text in two aligned panes so you can read matching lines across from each other. Both use the same diff underneath.What do Ignore case and Ignore whitespace do?
Does it work offline?
Can it compare code or JSON?
Published · Last updated .