Text Diff Checker
Line-by-line text comparison with the LCS algorithm — additions green, deletions red, unchanged lines plain. The same approach git diff uses.
In your browser—your files never leave your device.
Learn moreAbout this tool
Paste two versions of any text (code, prose, config, CSV, a contract) and the tool shows you exactly what changed. Additions are highlighted in green, deletions in red, unchanged lines stay in default text. Line numbers run down both sides so you can reference specific lines in conversation. The underlying algorithm is LCS (Longest Common Subsequence), the same approach git diff uses: it finds the longest shared sequence between the two texts and treats everything else as add/remove. Comparison runs in your browser; nothing is uploaded. Useful when you don't have git handy and need to see what changed between two pasted versions of a document, a config block, or a chat-pasted code snippet.
How to text diff checker
-
Paste the original on the left
The "before" version. Any plain text: code, prose, config, CSV, a contract clause. Newlines preserved. Use the "Try a sample" button if you want to see the tool in action without your own text.
-
Paste the modified on the right
The "after" version. The two panes don't need to be the same length — the LCS algorithm aligns matching lines regardless. Pasting a longer modified than original is fine; the extra lines just show up as additions.
-
Read the highlighted diff
After a 300ms debounce, the diff renders below. Green rows are additions, red rows are deletions, plain rows are unchanged context. Line numbers run down both sides. Stats at the top show counts of added, removed, and unchanged lines.
-
Copy the unified diff
The "Copy Diff" button puts a standard unified-diff format (with + and - prefixes) on your clipboard. Paste it into a code review, a chat, an email, or save it as a .patch file for `git apply` later.
Why use this tool
You need a diff outside of git all the time and don't always notice. A friend sends you a "fixed" version of a contract — you need to see what they actually changed before signing. A coworker pastes a "tweaked" config snippet in Slack — you need to spot the typo that'll bring down the build. You're reviewing a translation against the original — you need to see which paragraphs the translator actually touched. CMS-pasted blog post versus the version in your editor — you need to know if the CMS quietly stripped formatting or rewrapped lines. Git's `git diff` is the right answer when you have both versions in a repo, but you usually don't have a repo for ad-hoc text. This is for the everyday case: two blobs of text, what changed, show me.
Features
LCS algorithm — same as git
Longest Common Subsequence is the standard algorithm for line-based text diffing. Git, Mercurial, and most diff tools use it because it produces minimal-change diffs that match human intuition about what was added vs deleted. The implementation here is the textbook DP version with backtracking, which means accurate diffs on any pair of texts — no heuristic that occasionally produces nonsense alignment.
Color-coded with line numbers
Green rows for additions, red rows for deletions, plain rows for unchanged context. Two columns of line numbers — original on the left, modified on the right — let you reference specific lines in conversation ("see line 47 of the original"). Modified-only lines have no original number; deleted lines have no modified number; matching lines show both.
Debounced live processing
The diff updates as you type or paste, with a 300ms debounce so the algorithm doesn't run on every keystroke. Pasting a large diff just shows the result; tweaking the text gives you a smooth update without the UI thrashing. The debounce keeps the tool responsive on long inputs where the LCS calculation isn't instant.
Unified-diff export
The "Copy Diff" button copies output in standard unified-diff format, same as `diff -u` or `git diff`. Useful for pasting into pull-request comments, code reviews, or saving as a .patch file you can apply with `git apply` or `patch`. The format is the de facto standard for sharing text diffs across tools.
Privacy & security
This tool runs entirely in your browser. Your files are never uploaded to a server — every step of the process (reading, transforming, downloading) happens on your device using JavaScript and the Web APIs. You can verify this in your browser's network tab: clicking the tool's main action triggers zero requests to our servers. The page itself is served over HTTPS, but once it loads, your data stays put. No accounts, no tracking of file contents, no scanning your inputs.