Diff Checker
Paste two versions into this diff checker to see added and removed lines highlighted with counts, with an optional whitespace-insensitive mode. It runs entirely in your browser.
About Diff Checker
Paste the old version on the left, the new one on the right, and the differences appear underneath: removed lines in red with a minus, added lines in green with a plus, unchanged lines in grey for context, and a running count of each. The typical use is not source code, which you already have a diff for, but the text that lives outside version control - a config file pulled off a server, a pasted API response, two nginx blocks, an environment variable dump from each of two hosts.
There is no standard to cite for text diffing, only an algorithm: the longest common subsequence, the same basis as Unix diff. The tool finds the longest run of lines appearing in both inputs in the same order and treats everything else as an insertion or a deletion, which is why the output reads as a coherent change rather than as two files that merely differ from some point onwards. The failure mode it catches is configuration drift: two hosts that were identical at deployment and have since diverged by one directive, one timeout, one feature flag.
The diff is a full dynamic-programming LCS over lines, computed in the page. Above roughly four million line pairs the quadratic table would be too slow, so the tool falls back to listing everything as removed then added rather than hanging your browser, a limit you will only meet on very large inputs. The whitespace option trims each line and collapses runs of spaces before comparing, which suppresses the noise from re-indented YAML while still catching real changes. Nothing is uploaded, so pasting a production configuration here does not send it anywhere.
How to use it
- 1Paste the reference version into the Original box on the left.
- 2Paste the version you are comparing into the Changed box on the right.
- 3Tick Ignore leading/trailing and repeated whitespace if re-indentation is obscuring the real changes.
- 4Read the Differences panel: minus lines in red were removed, plus lines in green were added, grey lines are unchanged context.
- 5Check the added and removed counts in the header, which report that the two inputs are identical when nothing differs.
Common use cases
- -Comparing an nginx or Apache virtual host between staging and production to find the directive that drifted.
- -Auditing a Kubernetes manifest against the version you believe is actually deployed.
- -Troubleshooting an environment where a single variable differs between two otherwise identical service configurations.
- -Reviewing what a colleague changed in a pasted snippet when there is no commit to diff against.
- -Checking two DNS zone file excerpts for the record that was added or dropped during an edit.
Frequently asked questions
- How do I compare two text files online?
- Open both, paste one into each pane, and read the highlighted result. This checker compares line by line, marking removals in red and additions in green with a count of each, and offers a whitespace-insensitive mode. Because the comparison runs in your browser rather than on a server, the files can be production configuration without leaving your machine.
- What is a longest common subsequence diff?
- It is the algorithm behind Unix diff. The tool finds the longest sequence of lines present in both inputs in the same relative order, then reports everything outside that sequence as an addition or a deletion. The result is the smallest coherent set of changes rather than a naive positional mismatch, which is what keeps a diff readable when lines have been inserted in the middle.
- Is it safe to paste a configuration file into an online diff tool?
- Only if the tool is client-side. Configuration files carry hostnames, internal addresses, paths and sometimes credentials, and a server-side diff can log all of it. This one compares in your browser with no upload and no request, on a European service that loads no third-party scripts or trackers. Redacting secrets before pasting anything anywhere remains a good habit.
- How do I ignore whitespace when comparing two files?
- Enable the whitespace option, which trims leading and trailing spaces on each line and collapses repeated spaces before comparing. That removes the noise from re-indentation, a reformatting pass, or a mix of tabs and spaces, while still reporting genuine changes. Leave it off where whitespace is significant, as in YAML indentation, Makefile recipes or a heredoc block.