Toolra

Text Diff Checker – Compare Texts Online

Paste two versions of a text to see the differences highlighted line by line. Added lines are shown in green, removed lines in red.

How to Use

  1. 1

    Paste the original text in the left field

  2. 2

    Paste the modified text in the right field

  3. 3

    See added (green) and removed (red) lines highlighted in the diff panel below

Frequently Asked Questions

What is a diff?

A diff is a comparison between two texts that shows what changed between them. Added lines, removed lines, and unchanged lines are shown separately, making it easy to see exactly what was modified.

Does the diff work at the word level or line level?

This tool compares texts line by line. Each line is either equal, added, or removed. This is the most common approach for comparing code, documents, and configuration files.

What algorithm is used for the diff?

The diff uses the Longest Common Subsequence (LCS) algorithm, the same basis as the standard Unix diff command. It finds the minimal edit distance between the two texts.

Can I compare code with this tool?

Yes. The text diff works for any kind of text including code, JSON, configuration files, articles, and more. Paste any two text versions to see the differences.

Written by Published

Compare two texts side by side

A text diff tool highlights exactly what changed between two versions of a text — added, removed and altered lines. Paste both versions and the differences are colour-coded so nothing slips past you.

It is far faster and more reliable than re-reading two documents line by line.

What a diff is for

  • Comparing drafts, contracts or code revisions.
  • Spotting what someone changed in a shared document.
  • Checking copy-paste edits before you publish.
  • Comparing structured data? Format it first with the JSON formatter; for length, the word counter.

Both versions stay with you

Both texts are compared in your browser and never uploaded, so it is safe for sensitive content.

Related Tools