Text Diff
How it works
Reading the output
The format is the unified diff convention that git and the diff -u command use: lines starting with - exist only in the original, + only in the changed text, and a leading space marks unchanged context (two lines of it around every change). Each change block starts with an @@ -start,count +start,count @@ header giving 1-based line positions in each input, so you can jump straight to the spot in your editor.
Why paste diffs into a browser tool at all
The usual reason to avoid online diff tools is that both sides get uploaded - a non-starter for configs, dumps with credentials, or customer data. This page cannot upload: its Content-Security-Policy forbids every network request the page could make, so the comparison runs and dies in this tab. The engine trims the common start and end first, which is why comparing two 100,000-line files where only one line differs is instant; only genuinely differing regions pay the quadratic comparison cost, and pathological cases (two completely unrelated large texts) stop with a clear error instead of freezing the tab.
Examples
| a / b / c vs a / x / c | @@ -1,3 +1,3 @@ then ' a', '-b', '+x', ' c' |
| identical inputs | No differences. |
FAQ
What do the @@ headers mean?
@@ -2,5 +2,5 @@ means this block starts at line 2 of the original and covers 5 of its lines, and starts at line 2 of the changed text covering 5 lines. Same convention as git diff, so line numbers map directly to your editor.
Why does the diff show a change I cannot see?
Trailing whitespace. 'a ' and 'a' are different lines, and this tool never normalizes them away - invisible-but-real differences (trailing spaces, a missing final newline shown as an added empty line) are exactly what silent config drift is made of.
Is there a size limit?
Identical regions are effectively free: the common start and end are trimmed before comparison, so huge inputs with small changes are instant. The limit applies to the differing middle - when the two remaining regions are so large and unrelated that comparing them would freeze the tab, the tool stops with an error instead.
Are my texts uploaded to a server?
No. The page ships a strict Content-Security-Policy: connect-src 'none' blocks fetch, XHR, WebSockets and beacons, while default-src 'self' and form-action 'none' block every other way markup could send data off-site. Both texts stay in your browser.