Text Diff Checker

Compare two blocks of text line by line and see added and removed lines highlighted in green and red, with counts. Paste the original and changed versions.

Runs in your browser. No data leaves your device.

About this tool

Compares two texts line by line and marks each line as unchanged, added or removed, with counts of each. Use it for a quick check of what changed between two short versions of a list, config or paragraph set.

Features
  • Side-by-side Original and Modified input boxes
  • Real line diff (Myers algorithm, the longest common subsequence of lines): lines that exist in both texts stay matched even when lines are inserted or deleted around them
  • Diff view with line numbers, + for added lines (green), - for removed lines (red) and unchanged lines unmarked; indentation and spaces are shown as typed
  • Windows (CRLF) and Unix (LF) line endings compare as equal
  • Counts of unchanged, added and removed lines
  • Live update as you type; Clear button resets both inputs
How to use it
  1. Paste the original text in the left box.
  2. Paste the modified text in the right box.
  3. Read the color-coded diff and the counts below.
Inputs
  • Two blocks of plain text
Outputs
  • On-screen line diff and counts (there is no copy or export button for the diff)
Limits and notes
  • Line numbers refer to the original text for unchanged and removed lines, and to the modified text for added lines.
  • For two mostly unrelated texts (more than 2,000 line edits) the unmatched middle is shown as one removed block followed by one added block.
  • Comparison is exact: whitespace and case differences count as changes, and there is no word- or character-level highlighting.
  • The diff panel scrolls at about 500 px tall.
  • Text is not saved and nothing is uploaded.

Frequently Asked Questions

How does the Text Diff Checker work?

Both texts are split into lines and compared with the Myers diff algorithm, which finds the longest run of lines the two versions share. Shared lines are shown as unchanged, lines only in the original as removed (red, -) and lines only in the new version as added (green, +), so inserting a line marks just that line. Counts of unchanged, added and removed lines appear above the diff.

Can I compare code files?

Yes. The diff tool works with any text, including source code, configuration files, and documents. It treats the input as plain text and compares line by line.