DevKit

Text Diff Checker

Paste two versions of a document, config or snippet and see every line that changed.

Free No sign-up Runs in your browser
Original
Changed
0Added
0Removed
0Unchanged
Difference
Paste text in both panels to see the differences.

What a line diff shows

A diff aligns two versions of a text and marks the smallest set of changes that turns one into the other: lines that exist only in the original are shown as deletions, lines that exist only in the new version as additions, and everything else as unchanged context.

Under the hood this tool computes the longest common subsequence of the two line arrays — the same algorithm family that diff and Git's diff machinery use. It is why an added line in the middle does not cause every following line to be reported as changed.

When "everything changed" is a lie

If two files look structurally identical but the diff is entirely red and green, the line endings probably differ: Windows writes CRLF, Unix writes LF. Some editors also insert a byte-order mark. Normalise line endings before comparing — this tool strips \r so CRLF and LF files compare cleanly.

The other frequent culprit is whitespace: re-indenting a file or switching tabs to spaces produces a diff where every line changed. The Ignore whitespace toggle collapses runs of whitespace before comparing, so only meaningful edits remain.

Reading the output

  • − lines were removed from the original.
  • + lines were added in the new version.
  • The left gutter shows the line number in the original, so you can jump straight to that region in your editor.

Useful beyond code

Comparing two versions of a contract, a resume, a translation or a config file is the same problem. Because the comparison is purely textual, this works on any language, including CJK text where there are no spaces to anchor on.

Frequently asked questions

Is there a size limit?
The diff runs in your browser, so it is capped at about 1,600 lines per side to keep the page responsive. For very large files, use git diff or a desktop diff tool.
Does it compare words or lines?
Lines. That is the right granularity for code and configuration; for prose where a single word changed inside a line, the whole line is marked as changed.
Why does CRLF vs LF matter?
A carriage return is a byte like any other. Files with different line endings are genuinely different, so the diff reports every line. The tool normalises them so you see the meaningful changes.

Related tools