Text compare

Paste two versions of a text to see exactly what changed. Changed lines show the words that differ.

This free online diff checker works in your browser. Everything runs in your browser. What you type is not sent anywhere. All inputs and calculations run locally on your device without server uploads; details on browser processing and storage are set out in the privacy policy.

Reading the result

Lines starting with + (green) are only in the changed version. Lines starting with − (red) are only in the original. When a line was edited, both versions are shown one above the other, with the changed words highlighted. Unchanged lines are shown plainly, so you can see the context.

How it works

The comparison uses the Myers difference algorithm, the same method behind git diff. It finds the smallest set of added and removed lines that turns one text into the other, and then compares changed lines word by word.

Uses

  • Spot what a colleague changed in a contract or essay.
  • Compare two versions of a configuration file or code.
  • Check that a copied text is identical to the original.

Worked example: Spotting a subtle timeout and host change between two config versions

Suppose a staging deployment starts timing out and you compare yesterday's configuration (**Original**, left) against today's configuration (**Changed**, right):

  • Original (Left):
    DB_HOST=db-primary.internal
    DB_PORT=5432
    DB_TIMEOUT_MS=5000
  • Changed (Right):
    DB_HOST=db-replica.internal
    DB_PORT=5432
    DB_TIMEOUT_MS=500
  • Diff output: Line 2 (DB_PORT=5432) is unchanged. Line 1 highlights the word-level change from primary to replica, and Line 3 highlights the character-level change from 5000 ms down to 500 ms—immediately revealing the missing zero in the timeout setting.

Limits and what this tool cannot do

  • Compares plain text (not Word .docx formatting or PDF page layouts): If you paste text from two PDFs or Word documents, it compares the extracted characters and lines; it does not highlight font-size or color changes.
  • Reordered JSON keys or moved paragraphs: Because the diff algorithm (Longest Common Subsequence / Myers diff) compares lines sequentially from top to bottom, moving a paragraph from the top of a document to the bottom shows it as deleted at the top and inserted at the bottom. For unordered JSON comparison, sort keys with JSON Sorter or use JSON Compare.

Questions

Is there a size limit?

Texts of tens of thousands of lines work. Very different texts take longer, since every change has to be worked out.

Can I ignore extra spaces?

Yes. Turn on Ignore spacing and differences in spaces and tabs are not shown.

Is it private?

Yes. Both texts stay in your browser.

What does the 'Ignore whitespace' option do?

When ticked, lines that differ only in leading/trailing spaces or the number of spaces between words are treated as identical—useful when comparing code after someone ran a formatter.

How does word-level highlighting inside a changed line work?

First the tool finds which lines were added, removed, or modified using a line-by-line LCS diff. Whenever an old line is paired with a modified new line, a second intra-line diff highlights the exact words or characters that changed inside that line.

Is it safe to compare confidential contracts or source code here?

Yes. Both text boxes are compared locally inside your browser tab with zero network requests.

Last reviewed .

Related converters and guides