Diff Checker
Compare two texts or two JSON documents line by line or word by word.
Private by design. Your input never leaves this browser. Conversions run locally on your device.
What this tool handles
- Compares by line, by word, or semantically as JSON where key order does not count as a change.
- Side-by-side or unified view.
- Whitespace-only and case-only differences can each be ignored.
- Additions and removals carry a glyph as well as a colour.
Example
Original
jobs:
build:
runs-on: ubuntu-22.04
steps:
- run: npm test
Changed
jobs:
build:
runs-on: ubuntu-24.04
steps:
- run: npm ci
- run: npm test
Differences
===================================================================
--- left
+++ right
@@ -1,5 +1,6 @@
jobs:
build:
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
steps:
+ - run: npm ci
- run: npm test
When you would use it
- Reviewing a config change — Paste the running config beside the proposed one; the counts above the table — added, removed, unchanged — give you the size of the change before you read a line of it.
- Comparing two API responses — Staging and production often serialise the same object with the keys in a different order. JSON mode normalises that away, but element order inside an array is data and still shows as a change.
- Finding a whitespace-only edit — When a file reads as identical but the tooling insists it changed, compare with ignore-whitespace off to locate the reindented lines, then switch it on to confirm nothing else moved.
- Minified against formatted output — A minified bundle compared to its pretty-printed form is a single changed line in line mode and tells you nothing. JSON mode reduces the same pair to the values that genuinely differ.
Common questions
Does the diff ignore whitespace?
Not unless you ask it to. With ignore-whitespace on, leading and trailing whitespace stops counting, but a change to spacing inside a line is still reported. Word mode keeps spacing inside its own tokens, so the option only affects line and JSON mode.
Will it show a CRLF versus LF difference?
No. Both sides are normalised to \n before anything is compared, so a file converted from Windows to Unix line endings and nothing else reads as identical.
Can I apply the output as a patch?
It is a standard unified diff with three lines of context, the same default as git diff, but the file headers are fixed as left and right — relabel them before handing it to git apply.
What are the limits on size?
A comparison stops after 5000 changed chunks and says it was truncated. Either side above 2 MiB is still accepted, with a warning that diffing and rendering will be slow.
Related tools
- Case Converter — Convert text between camelCase, snake_case, kebab-case and six more styles.
- Regex Tester — Test a regular expression against text with highlighted matches and capture groups.
- Convert any format — Pick an input format and an output format and convert between any pair.
- JSON → YAML — Convert JSON to readable YAML with configurable indentation.
- YAML → JSON — Parse YAML and emit pretty-printed JSON.
- JSON → TOML — Convert a JSON object to TOML.