Is my text uploaded?
No. The diff runs in a Web Worker inside your browser. Nothing you paste is sent anywhere, which matters when you're comparing config files, logs or contracts.
Compare two texts by line, word or character with side-by-side and unified views, whitespace/case/line-ending options, Unicode normalization and .patch export.
Loading Text Diff…
Loading Text Diff…
A text diff is simple until it isn't: two config files that look identical but "every line changed", a contract where one clause moved, a log that differs only by a non-breaking space. This tool compares two texts by line, word or character, using the jsdiff library in a background Web Worker so large inputs don't freeze the page. Before diffing, it checks for the differences you can't see: CRLF versus LF line endings, a missing final newline, byte order marks, non-breaking and zero-width spaces, tabs, and Unicode normalization — and tells you about them in plain words instead of showing a wall of red. You can ignore whitespace, case and line endings, normalize Unicode to NFC, and make whitespace visible. Line mode has a side-by-side view with changed words highlighted inside changed lines, a unified view, next/previous navigation, and export as a standard unified .patch file.
jsdiff implements Myers' O(ND) diff, the same algorithm family as git diff. In line mode, a run of removed lines followed by added lines is paired up row by row, and each pair is diffed again by words so you see exactly what changed inside the line.
"Ignore whitespace" ignores leading and trailing whitespace in line mode and whitespace-only edits in word mode. "Ignore case" compares case-insensitively. "Ignore line endings" treats CRLF, CR and LF as the same. "Normalize Unicode" converts both texts to NFC first. A missing newline at the very end is reported but not counted as a changed line.
Side by side shows the original and changed text in aligned rows; unified shows removed lines (−) above added lines (+). Long runs of unchanged lines are collapsed to three lines of context, as in git diff. Next and previous jump between blocks of changes.
The .patch file is a unified diff with three lines of context and a/ b/ file headers. It uses the same line-ending and whitespace options you chose, so what you see is what the patch contains.
Short answers for the things developers usually ask before trusting a tool.
No. The diff runs in a Web Worker inside your browser. Nothing you paste is sent anywhere, which matters when you're comparing config files, logs or contracts.
Usually line endings: one file uses Windows CRLF and the other Unix LF. The tool detects this and says "the texts differ only in line endings" instead of marking every line. "Ignore line endings" is on by default; turn it off if the endings themselves matter.
Invisible characters. Common culprits are a byte order mark at the start, non-breaking spaces from word processors, zero-width spaces, tabs versus spaces, a missing final newline, or accented letters stored in different Unicode forms (é as one code point versus e plus a combining accent). The tool lists which of these it found on each side; "Show whitespace" and "Normalize Unicode (NFC)" help confirm it.
Line mode compares whole lines — best for code and config, and the only mode that can produce a patch. Changed lines are paired and the changed words inside them highlighted. Word mode shows insertions and deletions inline, which suits prose. Character mode finds the smallest edits, useful for IDs, hashes and single-line values.
Yes. "Download .patch" saves a unified diff with a/ and b/ paths that git apply, patch -p1 and jsdiff's applyPatch accept. The export is tested by applying it back to the original.
Hundreds of thousands of lines work, because the diff runs in a background worker and doesn't freeze the page. Above 50,000 lines only line mode is offered, and very different large files can take a few seconds.
Useful follow-ups when one conversion usually turns into three more.
Compare two JSON documents semantically: key order ignored, big numbers exact, arrays by position or by key, ignore paths, and export an RFC 6902 JSON Patch.
Format, validate, and minify JSON instantly with a browser-first editor.
Live regex testing with match highlighting, capture groups, and flag controls.