We use cookies and similar technologies to enhance your browsing experience, analyze site traffic, and personalize content and ads. By clicking "Accept", you consent to our use of cookies. Learn more in our Privacy Policy.
by Cosmovex
A diff checker takes two blocks of text and shows you exactly what changed between them: which lines were added, which were removed, and which were modified. Paste an old version on the left and a new version on the right, and the tool aligns matching lines and highlights the differences so you can scan them at a glance instead of reading both versions word by word.
This is useful any time you have two slightly different versions of something and need to know precisely where they diverge: two drafts of an email, config files from staging and production, a function before and after a refactor, or JSON responses from two API calls. Everything runs in your browser. The text you paste is never uploaded to a server, which matters when you are comparing logs, credentials, or anything else you would rather not send over the network.
Paste your two texts into the left and right panels. The tool breaks each side into lines, finds the longest run of lines that match between them, and uses those anchors to line up the rest. Lines that exist only on the right are marked added, lines that exist only on the left are marked removed, and a removed line directly followed by an added line in the same spot is shown as a change.
Key features:
+/- column) for copying into a commit message or ticket.No file uploads, no account, no size limit beyond what your browser can hold in memory.
Say you tweaked a config and want to confirm only what you intended changed.
Left (old):
host = localhost
port = 5432
timeout = 30
retries = 3
Right (new):
host = localhost
port = 5432
timeout = 60
retries = 3
ssl = true
The checker keeps lines 1, 2, and 4 paired and unhighlighted. It marks timeout = 30 → timeout = 60 as a change, with only 30/60 highlighted inline. It marks ssl = true as an added line at the end. You can now say with certainty that two things changed and nothing else moved. Without a diff, line 5 being new can easily push your eye out of alignment and make you think later lines also changed when they didn't.
staging.env against prod.env, or a working config against a broken one, to find the single line that differs.A few things trip people up:
\r\n while your other side uses \n. Some diffs flag every line because of this. Normalizing line endings (or an ignore line endings option) fixes it.Under the hood, a line diff solves the longest common subsequence (LCS) problem: given two sequences of lines, find the longest ordering of lines that appears in both (in the same relative order, not necessarily contiguous). Everything in that common subsequence is "unchanged"; everything left over on the left is a deletion and everything left over on the right is an insertion.
That framing explains the behavior you see. It's why a moved block reads as a delete plus an insert (the move breaks the common ordering), and why two lines that differ by one word show as a delete-then-insert pair at the line level — they're simply not the same line. Inline highlighting is a second, smaller diff run on just that changed pair, usually over words or characters, to pinpoint the actual edit. Understanding LCS also tells you why ignoring whitespace and case helps: it makes more lines compare as equal, which grows the common subsequence and shrinks the noise.
Added lines exist only in the new (right) text, removed lines exist only in the old (left) text, and a changed line is a removed line replaced by an added one in the same position — usually shown together with the specific words that differ highlighted inline.
Almost always invisible characters: a trailing space, a tab instead of spaces, or different line endings (\r\n vs \n). Enable the ignore-whitespace or ignore-line-endings option and they should match.
Yes. The diff is language-agnostic and works on any text, including source code, JSON, YAML, SQL, and config files. For minified or single-line code, format both sides first so each statement is on its own line.
No. The comparison runs entirely in your browser using JavaScript. Nothing you paste is sent to a server, so it's safe for logs, configs, and other sensitive content.
Line-based diffs match lines by position and order, not by tracking movement. Moving a block breaks the common ordering, so the old spot reads as removed and the new spot as added. This is normal.
After pairing a removed line with the added line that replaced it, the tool runs a second, finer diff over just those two lines at the word or character level, then highlights only the parts that actually differ.
There's no hard server-side cap because it's all local, but very large inputs (tens of thousands of lines) are limited by your device's memory and CPU. For huge files, compare the relevant section rather than the whole thing.
Yes. Ignore-case treats uppercase and lowercase as equal, and ignore-blank-lines skips empty lines, which is handy when only formatting or capitalization differs and you want to focus on substantive changes.