Diff Checker
Paste the original text in the left box and the changed text in the right box, then click Compare. The tool performs a line-by-line diff with line numbers and highlights additions in green and deletions in red, making it easy to spot what changed between two versions. All comparison runs in your browser — no files are uploaded.
Related Tools
[5 suggestions]Regex Tester
Test regular expressions against a string, highlight matches, and inspect capture groups.
Developer & WebJSON Formatter
Validate, pretty-print, and minify JSON with clear error reporting for invalid input.
Developer & WebRemove Duplicate Lines
Strip repeated lines from any block of text while preserving initial ordering.
Line & ListsSQL Formatter and Beautifier
Format and beautify SQL queries with one clause per line, keyword case and indent options, for PostgreSQL, MySQL, SQLite, SQL Server and more.
Developer & WebXML Formatter and Validator
Format, minify and validate XML. Errors show the line and column, and the text inside your elements is never changed.
Developer & WebGuides for the Diff Checker
- How to Format XML and Fix Well-Formedness Errors
Learn how to format XML and fix well-formedness errors: unclosed tags, nbsp, bad attributes. Tested against libxml2 on 42,145 documents. (November 15, 2026)
- How to Format SQL: Style Rules, Dialects and Safe Formatting
Learn how to format SQL: clause layout, keyword case and why the dialect matters. Tested on 1,434 queries against SQLite bytecode, with no change in meaning. (November 13, 2026)
- How to Convert YAML to JSON: Types, Anchors and Multiple Documents
Learn how to convert YAML to JSON in a browser, Python, JavaScript or yq, and what changes on the way: yes and no, anchors, comments and big numbers. (November 8, 2026)
- JSON Parse Error: Common Causes and How to Fix Each One
Fix a JSON parse error: 15 causes with the real error messages from Node 24 and Python 3.14, plus what valid JSON can still get wrong. (October 28, 2026)
About the Diff Checker
The Diff Checker compares two texts line by line with Myers' O(ND) algorithm, the default diff algorithm in Git. It finds the fewest added and deleted lines that turn the original into the changed text. Lines only in the original are marked as deletions (red), lines only in the changed text are additions (green), and the rest is shown as unchanged context with line numbers for both sides. Because the running time depends on how many lines changed rather than on the product of the two file sizes, a large file with a few edits compares in milliseconds: 100,000 lines with 40 changed lines took about 0.14 seconds in our tests. Windows (CRLF), Unix (LF) and old Mac (CR) line endings are treated as the same, so a file saved on another system does not show every line as changed. Two options help with noisy differences: ignore_case, and ignore_whitespace, which ignores spaces and tabs at the ends of lines and treats a run of spaces as one. If the two texts differ in more than 20,000 lines the tool says so instead of freezing the page. Everything runs in your browser. Common uses include comparing versions of a configuration file, checking what changed between two drafts and reviewing edits to a contract.
Is this a word-level or line-level diff?▾
The diff operates at the line level — each line is treated as a single unit. Lines that are present in one version but not the other are highlighted entirely. Word-level diffing within a changed line is not currently performed.
How does the diff algorithm work?▾
It looks for the longest common subsequence: the largest set of lines that both texts share in the same order. Lines outside that set are additions (only in the new text) or deletions (only in the original). The tool uses Myers' algorithm, which Git uses by default, and it always returns the smallest possible number of changed lines.
Is there a size limit for the inputs?▾
Large files work well when they are mostly alike: 100,000 lines with 40 changed lines took about 0.14 seconds in our tests. The time grows with the number of changed lines, so two completely different texts of 3,000 lines each took about 0.7 seconds. Above 20,000 changed lines the tool stops and asks you to compare smaller parts.
Why do all my lines show as changed when the text looks the same?▾
The usual cause is line endings: Windows files end lines with CR and LF, Unix files with LF only. This tool treats them as the same. If lines still differ, the cause is probably trailing spaces, tabs or different capitals, which the ignore_whitespace and ignore_case options skip.