📄 Original (A)
📝 Modified (B)

The Question That Makes Diff Tools Essential

"What changed between these two versions?" sounds simple. But comparing two blocks of text manually — scanning line by line for differences — is cognitively exhausting and error-prone. It takes minutes for even small files and provides no confidence that you caught everything. A diff tool turns this into a millisecond operation with a colour-coded answer.

This checker uses the Longest Common Subsequence (LCS) algorithm — the same mathematical foundation as Unix's diff command and Git's diff engine. LCS finds the minimum number of additions and deletions needed to transform Text A into Text B, which produces the cleanest possible diff: no unnecessary changes, no noise from formatting shifts.

Reading the Output: Lines, Colour, and Markers

Red lines with a marker are present in Text A (the original) but absent from Text B (the modified). Green lines with a + marker are in Text B but not in Text A. Unmarked lines are identical in both and provide context around the changes. This is the universal diff convention — any developer who has looked at a Git pull request will read it instantly.

Line numbers are shown for each panel. For large texts with changes scattered throughout, the line numbers let you jump directly to the corresponding location in your actual files when you need to make the edit.

Comparing JSON Without Key-Order Noise

JSON objects don't have a defined key order — two JSON blobs containing identical data can look very different if a serialiser changed the key ordering. Naively diffing them produces a wall of red-and-green noise where most changes are meaningless key reorderings rather than data changes. The solution: use the JSON Formatter's Sort Keys feature on both blobs before pasting them here. Sorted keys eliminate the reordering noise, and the diff shows only genuine data differences.

Five Practical Uses Beyond Code Review

  • Contract and document review: Legal teams often need to track changes between document versions. Paste both versions here to see exactly which clauses were modified, added, or removed without manually reading through both documents.
  • Configuration drift detection: Servers in a cluster should have identical configuration files. Paste two config files here to immediately identify configuration drift — settings that diverged between instances.
  • Before-and-after for generated code: Code generators, scaffolding tools, and migration scripts produce output that needs verification. Compare the current output against the expected output or a previous run.
  • API response change detection: When a third-party API changes its response format, paste an old cached response next to a new response. After formatting both with the JSON Formatter, diff them to see exactly what fields were added, removed, or renamed.
  • Database migration review: Compare the before and after of SQL migration scripts, or compare two versions of an ORM schema file to understand what database changes a migration will apply.

LCS vs Myers Algorithm — Why the Difference Matters

The Myers diff algorithm (used by default in Git) is optimised for the common case where files are mostly similar. LCS is the classic formulation that guarantees minimum edit distance. For typical text comparison tasks, both produce equivalent results. This tool's LCS implementation produces clean, minimal diffs across all input types — code, prose, configuration, data files — without the optimisation heuristics that can sometimes produce unexpected results in the Myers algorithm.

Privacy

Both text panels are compared entirely within your browser. Nothing is transmitted to any server. Safe for comparing proprietary code, confidential documents, and sensitive configuration data. The comparison result exists only in your browser's memory and disappears when you close the page.

Verified by ToollyX Team · Last updated June 2026

Frequently Asked Questions

Disclaimer: Diff computation runs entirely in your browser. No text from either panel is transmitted to any server.