araç köşesi

Text Compare (Diff Checker)

Compare two texts line by line and see what was added and removed

Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.

How it works

Paste the older version into the left pane and the newer one into the right; the difference appears in the panel below straight away. Unchanged lines are listed as they are, removed lines are prefixed with a minus sign and added lines with a plus sign. Paste two versions of a tenancy agreement, for instance, and only the changed clauses stand out: the line reading 1,850 is marked with a minus, the line reading 2,050 with a plus, and the untouched clauses stay quiet in between. The comparison works on whole lines, so a single changed character marks that line as removed and re-added. Where one line is removed and a single line is added right after it — that is, where a line was edited — the tool adds a third line starting with ~ that shows what changed inside it: the wording that left is wrapped in [-square-] brackets, the wording that arrived in {+curly+} ones. In the tenancy example that line reads "The monthly rent is [-1,850-]{+2,050+} pounds.", so you need not compare the two marked lines by eye. When copies from different sources differ only in indentation, set Whitespace differences to Ignored and those lines count as identical. Shared opening and closing lines are trimmed away first and the rest goes through a fast difference algorithm, so a long document with few changes is compared instantly; above 200,000 lines the tool asks you to compare the documents in sections. The result line totals the added, removed and unchanged lines, and the difference itself can be copied or downloaded as a .txt file.

This tool is also known as text compare, diff checker, compare two texts, text diff online, document comparison.

What is Diff?

A diff is the output format that lists the differences between two texts line by line; the name is simply short for difference. Programmers built it to track changes in source code, and the notation stuck: unchanged lines are printed as they are, lines that left the old version get a minus in front, lines that entered the new version get a plus. The same display works for contracts, coursework, policies and announcements, because the eye cannot reliably find the three changed lines among four hundred unchanged ones without those markers doing the pointing.

What is Line-based comparison?

In a line-based comparison the smallest unit is one line: two lines are either identical or entirely different, and the tool never descends to the words inside them. The approach keeps the result fast and readable, and it suits anything written in clauses or bullet points, where each change already lives on its own line. The price is precision within a line: a line with one changed letter appears twice, once as removed and once as added. This tool softens that price: when one line is removed and one line takes its place, it adds a ~ line underneath marking which words left and which arrived.

What is the difference between a line diff and a word diff?

A line diff decides per line: it either matches a line exactly or reports it as removed and added, which is what this tool does. A word diff goes further and marks the individual words that changed inside an otherwise matching line, the way a word processor's track-changes view does; this tool adds that word-level view on the ~ line whenever a single line was replaced by a single line. Each has a cost. Word-level output is precise but noisy on heavily edited text, and it needs the two versions to be broken into lines the same way before it can help at all. Line-level output stays legible on long documents and maps directly onto how contracts, policies and lists are written — one clause, one line — at the price of pointing you to the line rather than to the word. Breaking long paragraphs into sentence-per-line before comparing gets you most of the precision of a word diff without the noise.

The trap of line-based diffs: one very long line

The comparison splits each text into lines. When a whole paragraph sits on a single line — normal for text copied out of a web page or a word processor — a one-word change anywhere in it marks the entire paragraph as one removed line and one added line, and you are left hunting for the actual difference with your eyes.

The ~ line softens this: because the paragraph was removed and added again, the tool compares the two versions word by word and marks the wording that changed. Even so, if you work with long paragraphs, break the text into lines at sentence ends before comparing. As long as both versions are broken the same way, the tool then marks only the sentence that genuinely changed.

When to ignore whitespace differences

Texts copied from different places are often identical in content and different in spacing: the version from an email carries indentation at the start of lines, the version from a table carries invisible trailing spaces. With Ignored selected, lines that differ only in leading or trailing whitespace count as the same, and the list narrows down to real content changes.

Where indentation carries meaning — code, a YAML configuration, a formatted list — it has to count. A Python line with different indentation genuinely runs differently. That is why the default setting compares lines exactly.

Frequently asked questions

How do I compare two texts?

Paste the old version into the left pane and the new one into the right. The panel below lists unchanged lines as they are, removed lines with a minus and added lines with a plus, and the result line totals all three.

Can I compare Word or PDF documents?

This tool compares plain text. Select the text inside the Word or PDF file, copy it and paste it into the panes; formatting such as bold or colour plays no part, only the words are compared.

Why does a one-character change show up as two lines?

The comparison is line-based: even a single changed letter makes the old line removed and the new line added. A third line starting with ~ follows the pair and marks the words themselves — [-old-] wording in square brackets, {+new+} wording in curly ones — so you do not have to spot the difference by eye.

Is there a size limit?

Identical opening and closing lines are trimmed before the work starts, so long documents with few changes are cheap to compare. Texts of up to 200,000 lines are accepted; past that, and for two very long texts that share almost nothing, the tool asks you to compare matching sections rather than lock up the tab.

Are my texts uploaded?

No. The comparison runs entirely inside your browser, so a contract or an unpublished draft never leaves your computer, and closing the tab clears what you pasted.