Text Diff Checker

Text A
Text B
Add text above to see differences.
About

Text diffing compares two text blocks and identifies the minimum set of additions and deletions needed to transform one into the other. This is the same technique used by version control systems like Git to track changes between file revisions.

How to use
  1. 1.

    Paste the first text into the Text A panel and the second text into the Text B panel

  2. 2.

    Additions are highlighted in green, deletions in red

  3. 3.

    Scroll through the diff to review all changes

Common uses
  • Comparing two versions of a config file or script

  • Reviewing edits in a document or code snippet

  • Spotting unintended changes between two text blocks

Frequently asked questions
What algorithm does this use?

Line-level changes are detected using the diff library's longest-common-subsequence algorithm, the same approach used by Unix diff. When a block of lines is modified (equal numbers of removed and added lines), word-level highlighting is applied within each line pair to show exactly which words changed.


Does it show inline word-level differences?

Yes - when a line is modified rather than fully added or removed, the specific words that changed are highlighted with a stronger colour against the line background. Lines that are purely added or removed are shown fully highlighted.


Can I compare code files?

Paste any plain text including source code, configuration files, or prose. The tool compares line by line with word-level highlights for changed lines.


Is my text sent to a server?

Comparison runs entirely in your browser. Neither text block is transmitted or stored anywhere.


Is there a size limit?

Each side is limited to 2,000 lines. Inputs that exceed this limit show an error and the diff is not computed, to prevent the browser from freezing.