Text Compare (Diff Checker)
Line-by-line diff of two blocks of text. Free, and runs entirely in your browser — nothing you enter is uploaded, stored or sent to a server.
About Text Comparison
Two blocks of text, compared line by line with a longest-common-subsequence algorithm — the same approach diff and Git use — so unchanged lines are matched up and only real insertions and deletions are marked.
A line that was edited rather than replaced is paired with its new version and compared again word by word, so a changed port number is marked as a changed port number rather than as a rewritten line. That inline marking is the difference between reading a diff and searching one.
The result can be read side by side, with both sets of line numbers, or as a unified list. Long unchanged stretches are folded to a few lines of context, with a note of how many were skipped — and the whole comparison is also written out as a diff -u patch you can copy into a review or apply with patch.
Case, whitespace and blank lines can each be ignored, which is what makes it usable on reformatted files, and it suits the comparisons that never reach version control: two config files from different environments, a response before and after a deployment, an email draft against the version that was sent.
Where it helps
- Proper LCS matching, so moved and unchanged blocks are not reported as wholesale rewrites.
- Marks the changed words inside a changed line, rather than only the line.
- Side-by-side or unified, with line numbers on both sides and long unchanged stretches folded away.
- Writes the comparison out as a unified patch, ready to paste into a review or feed to
patch. - Case, whitespace and blank lines can be ignored, which makes a reformatted file comparable again.
- Local, which matters when comparing production configuration.
Limits
- Trailing whitespace and line-ending differences count as changes unless whitespace is ignored, which is correct but sometimes noisy.
- A moved block appears as a deletion plus an insertion, since there is no move detection.
- Very large inputs are quadratic in the comparison, so multi-megabyte files are better handled by
diffitself.
Frequently asked questions
Why is a whole line marked changed when I altered one word?
The comparison unit is the line. For word-level detail, split the text so each sentence sits on its own line.
Why is everything marked different when the files look identical?
Almost always line endings — CRLF against LF — or trailing whitespace. Run both sides through the Whitespace Remover first.
Can it compare JSON or XML properly?
Format both sides first, with sorted keys for JSON. Structural formatting makes a line diff meaningful.
Is the comparison case sensitive?
Yes. Lowercase both sides with the Case Converter if case differences are not interesting.
Related tools
- Duplicate Remover — Remove, isolate or list duplicate lines
- Whitespace Remover — Trim, collapse and normalise whitespace
- Structure Compare — Diff two JSON, XML, YAML, TOML, TOON or HCL documents by path
- Word Counter — Count words, characters, sentences and reading time
- Markdown Viewer — Read a Markdown file the way it is meant to look, with its contents beside it
- Markdown to HTML — Convert Markdown to HTML you can paste somewhere, with the rendered page beside it
More Text Tools tools
- Markdown Viewer — Read a Markdown file the way it is meant to look, with its contents beside it
- Markdown to HTML — Convert Markdown to HTML you can paste somewhere, with the rendered page beside it
- Case Converter — Switch between sentence, camel, snake and other cases
- Word Counter — Count words, characters, sentences and reading time
- Duplicate Remover — Remove, isolate or list duplicate lines
- Whitespace Remover — Trim, collapse and normalise whitespace
- Sort Lines — Sort lines alphabetically, naturally, by number or length, reverse them, or shuffle them