↑

Free Text Diff Checker

What this tool does

The Text Diff Checker compares two texts line by line and highlights exactly what changed: added lines in green, removed lines in red, and unchanged lines in plain text. It reports added, removed and unchanged line counts plus an overall similarity percentage, and can ignore whitespace or case differences. Swap the texts or copy the diff in one click. Free, private and instant in your browser, with no signup.



-
Similarity
-
Lines added
-
Lines removed
-
Lines unchanged
Differences (line by line)
-
Green lines were added, red lines were removed. Similarity=unchanged lines / total lines compared.

Let us know

Please share your experience with this tool.

Thanks for rating!
No ratings yet — be the first!

How do I compare two texts and find the differences?

 

Paste the original text in the first box and the changed text in the second, and the comparison runs instantly. Added lines appear in green with a plus sign, removed lines in red with a minus sign, and unchanged lines stay plain. The stats show how many lines were added, removed and left unchanged, plus an overall similarity percentage. In the built-in sample, a 5-line text compared with a 6-line revision gives 3 unchanged lines, 3 added lines, 2 removed lines and 50% similarity. You can swap the two texts to reverse the comparison, copy the whole diff with its plus and minus markers, and optionally ignore whitespace or case differences so formatting changes do not drown out real edits.

How does the diff algorithm work?

The checker compares the texts line by line using a longest-common-subsequence algorithm, the same family of methods behind version-control diffs. It finds the longest sequence of lines that appears in both texts in the same order; those are the unchanged lines. Everything in the original that is not part of that sequence counts as removed, and everything extra in the changed text counts as added. This is why inserting a line in the middle does not make every following line look changed: the algorithm realigns the matching lines after the insertion. A changed line shows as one removal plus one addition, exactly like a git diff, which makes the output familiar to anyone who reviews code or documents.

What does the similarity percentage mean?

Similarity is the number of unchanged lines divided by the larger of the two line counts, shown as a percentage. Identical texts score 100%, and completely different texts score 0%. The sample revision scores 50% because 3 of its 6 lines survived unchanged while the rest were edited or added. Use the score as a quick gauge: a light edit of a long document might score 95% or more, a heavy rewrite might score 40%. When the ignore-whitespace or ignore-case options are on, lines that differ only in spacing or capitalization count as unchanged, so the similarity reflects content changes only. For very long texts, remember the comparison is line-based: one long paragraph counts as one line, so adding line breaks first gives a finer-grained result.

When should I ignore whitespace or case?

Ignore whitespace when the two texts may have been reformatted: different indentation, trailing spaces, or tabs versus spaces, which is common when code moves between editors or when text is copied from a PDF or web page. Ignore case when capitalization differences do not matter for your purpose, such as comparing headings, lists or data where "Tools" and "tools" should count as the same line. Leave both off when exact formatting matters, for example when checking configuration files, contracts, or text where capitalization carries meaning. The options can be combined, and the diff, counts and similarity update immediately when you toggle them.

What can I use a text diff checker for?

Developers compare code versions, config files and logs to see what actually changed between releases. Writers and editors compare drafts to review revisions, check that edits were applied, and confirm nothing was lost. Students compare their work against a source to check paraphrasing, and teachers compare submissions. Support teams compare error logs from two runs, and anyone can compare two versions of a document, a list, or a set of notes to spot accidental deletions. Because the diff can be copied with plus and minus markers, it pastes cleanly into emails, tickets and chat messages as a readable change summary.

Is it free and private?

Yes. The text diff checker is free, with no signup, no account and no limits. The comparison runs entirely in your browser, so both texts stay on your device: nothing is sent to a server, stored or logged, and everything disappears when you clear the boxes or close the tab. That matters for source code, contracts, exam answers and unpublished writing. For a fast, clear line-by-line comparison with similarity scoring and copy-ready output, this page does the job in seconds.

FAQs

How are differences shown?

Added lines in green with a plus sign, removed lines in red with a minus sign, unchanged lines in plain text.

How is similarity calculated?

Unchanged lines divided by the larger line count, as a percentage. Identical texts score 100%.

What does ignore whitespace do?

Lines that differ only in spacing, tabs or indentation count as unchanged, so formatting changes are hidden.

Can it compare code?

Yes. The line-based diff works like a git diff, so it suits code, configs, logs and documents alike.

Can I copy the result?

Yes. Copy diff puts the whole comparison on your clipboard with plus and minus markers, ready to paste anywhere.

Is my text stored anywhere?

No. Comparison runs in your browser. Both texts stay on your device and are never sent to a server.


Author

Awais Arshad

Web Tools Developer & Content Creator at FastToolKit.