Text Diff
Compare two blocks of text or code line by line. Unified diff with added/removed markers, line numbers, and optional ignore-whitespace and ignore-case. Runs in your browser.
About this tool
Paste two versions of a file, a config, or any text into the two boxes and
see exactly what changed. The tool aligns the inputs with a
longest-common-subsequence diff — the foundation of git diff
and most code-review tools — and presents the result as a unified list:
removed lines in red with a −, added lines in green with a
+, and the unchanged lines around them for context. A running
+added / −removed count sits in the toolbar.
Two options change how lines are matched without changing what you see. Ignore whitespace trims each line and collapses internal runs of spaces, so a pure reindentation or a trailing-space cleanup does not drown the real changes. Ignore case compares letters case-insensitively. Use Swap to flip which side is the original — handy when you pasted them the wrong way around.
This is a line-level diff, so each line is treated as an atomic unit: there is no word-level highlighting within a changed line. That keeps the output fast and readable for source code, JSON, logs, and config files, which is where line diffs shine. Everything runs client-side, so you can compare internal configs or proprietary code without any of it leaving your machine.
Frequently asked questions
How does the diff work?
It compares the two inputs line by line using a longest-common-subsequence algorithm — the same idea behind git diff. Lines only in the original are shown as removed (−), lines only in the changed text as added (+), and unchanged lines in between for context.
What do “ignore whitespace” and “ignore case” do?
Ignore whitespace collapses runs of spaces and trims each line before comparing, so reindentation does not show as a change. Ignore case compares letters case-insensitively. Both affect only the comparison — the text shown is always your original.
Is this a character-level or line-level diff?
Line-level. Two lines either match or they do not; there is no intra-line highlighting of the specific words that changed. For prose or code that is usually what you want; for single long lines, break them up first.
Can I compare large files?
Moderate files are fine. The algorithm is quadratic in the number of lines, so two very large inputs (tens of thousands of lines each) may get slow. It all runs in your browser, so nothing is uploaded regardless of size.
Is my text sent anywhere?
No. The comparison runs entirely in your browser. Neither side of the diff leaves your device.