Text Compare

Text Compare — a free online tool.

How the comparison works

Both texts are split into lines and compared to find the longest sequence of lines they share in common - everything outside that shared sequence is marked as either removed (only in the original) or added (only in the changed version). This line-based approach is the same core idea used by most code diff tools and version control systems, which makes it easy to spot exactly what changed between two drafts, versions of a contract, or pieces of content.

Why line-level comparison, not word-level

Comparing whole lines at a time suits content that's naturally organized into discrete lines - code, configuration files, structured lists, or any text where each line represents one complete unit. For prose or essay-style writing where you want to see exactly which individual words changed within an otherwise identical sentence, the companion word-level Diff Checker tool on this site is the better fit.

Reading the added/removed summary

The summary line at the top gives a quick count of how many lines were added and removed in total, before you scan the detailed output below - useful for getting a sense of how substantial the changes are between two versions before digging into the specifics of what actually changed.

A limit worth knowing: a single changed word flags a whole line

Because comparison happens at the line level, changing even one word within an otherwise identical line causes that entire line to show as removed from the original and added in the revision, rather than highlighting just the specific word that changed - this is expected behavior for a line-based diff, and it's exactly why the word-level Diff Checker exists as a complementary tool for that more granular view.

Câu hỏi thường gặp

Does this compare word by word or line by line?

Line by line - if a single word changes within an otherwise identical line, that whole line is shown as removed from the original and added in the changed version.

Is my text uploaded anywhere?

No - the comparison runs entirely in your browser with JavaScript. Nothing you paste is sent to a server.

Should I use this or the Diff Checker tool for comparing an essay?

For prose where you want to see exactly which words changed within sentences, the word-level Diff Checker is the better fit. This line-based tool suits code, configuration files, or any line-structured content.

Why does reordering two identical lines show up as a change?

The comparison finds the longest matching sequence of lines in their original order - if two lines swap positions, that breaks the matching sequence at that point and shows as a removal and addition, even though the same lines exist in both versions.

Can I compare two versions of code with this tool?

Yes - line-based diffing is exactly the approach most code version-control diff views use, so this works well for comparing two versions of a script, config file, or any other line-structured text.

Xem thêm trong Content & Writing Tools