Text Diff

Compare two texts line by line and see exactly which lines were removed, added, or left unchanged.

Original text

New text



Comparison result
Click “Compare” and the differences will appear here line by line: red lines were removed from the original, green lines were added in the new text, and plain lines are unchanged context.
Comparison is line based: changing one word marks the whole line as changed. Each side is limited to 2000 lines.

Runs locally in your browser. Nothing is uploaded.

What is Text Diff?

Text Diff is a free online tool that compares two blocks of text and highlights the differences between them, line by line. It is built for the common situation where two versions of a document are mostly the same and only a few lines have changed: a revised configuration file, an updated list of names, a draft before and after editing, or two exported data files that should match. Reading such pairs by eye is slow and error-prone, because the eye skips over lines that look familiar. A diff makes every change explicit, so nothing slips through unnoticed.

The comparison uses the longest common subsequence (LCS) algorithm. It first finds the lines that appear in the same order in both texts and treats them as the unchanged skeleton. Lines present only in the original are marked as removed and shown in red, while lines present only in the new text are marked as added and shown in green. Unchanged lines stay visible as plain context, so each change can be read in its proper place instead of floating in isolation. Because the comparison is strict, a trailing space or an extra blank line counts as a real difference, which is exactly the level of precision needed when checking configuration files or exported lists.

How to use Text Diff

First, paste the older version into the left box and the newer version into the right box. Next, click "Compare" to see the result below: removed lines in red, added lines in green, and unchanged lines as context. If the two texts are identical, the tool says so directly instead of showing an empty result. Use "Swap sides" to reverse the direction of the comparison, and "Clear" to start over with empty boxes.

Frequently asked questions

Why does changing one word mark the whole line?
This tool compares text line by line, not word by word. Any change inside a line makes the whole line appear once as removed and once as added. For configuration files and lists, this line-level view is clearer than highlighting single characters.

Do trailing spaces and blank lines count as differences?
Yes. Every line is compared exactly as written, so a trailing space or an extra blank line is reported as a difference. This strictness helps when two files that look identical still behave differently.

Is there a size limit?
Each side is limited to 2000 lines, which covers most documents, lists, and configuration files. For longer texts, split them into sections and compare each section separately.

Is my text sent anywhere?
No. The comparison runs entirely in your browser, and your text never leaves your device.

Related tools

Remove Duplicate Lines · Word Counter · Character Counter · Regex Tester

Runs locally in your browser. Nothing is uploaded. How our privacy works

© 2026 TinyLabTools · tinylabtools.com