Diff Checker
Compare two texts or JSON documents. Line, word, char, and JSON-aware modes.
- [FREE]
- [NO_SIGNUP]
- [NO_UPLOAD]
How to use the diff checker
- Paste both versions. Drop the original on the left and the new version on the right. The output updates live.
- Choose a granularity. Line for code, configs, and structured data. Word for prose and documentation. Char for catching a single typo. JSON-aware when both sides are JSON and key order doesn’t matter.
- Choose a view. Side-by-side puts the two versions next to each other with matching lines aligned. Unified stacks the changes with
+and−markers likegit diff. - Apply ignore options. Ignore whitespace (line mode only) makes indentation changes invisible. Ignore case matches
FOOandfooeverywhere except JSON mode. - Share or swap. Swap flips which side is “original.” Copy share link encodes the whole session into a URL.
When to use which mode
| Scenario | Mode |
|---|---|
| Compare two versions of a config file | Line |
| Compare two responses from the same API endpoint | JSON-aware |
| Check what a paragraph rewrite changed | Word |
| Spot a single-character typo in a code line | Char |
| Compare two log files where timestamps differ | Line + Ignore whitespace |
Compare two package.json files where formatting differs | JSON-aware |
JSON-aware mode in detail
Two JSON documents are considered identical when they parse to the same structure, regardless of:
- Key order (
{"a":1,"b":2}=={"b":2,"a":1}) - Whitespace and indentation
- Trailing commas (rejected as invalid JSON, but you can pre-clean with the JSON Formatter)
A difference is reported when a key is added, removed, or has a different value. Nested arrays and objects are walked recursively.
If either side is invalid JSON, the tool surfaces the parse error rather than guessing.
Line mode and whitespace
Without Ignore whitespace: " foo " and "foo" are reported as different lines.
With Ignore whitespace: they are considered the same. This is the equivalent of diff -w.
Trailing newlines are normalized — a file that ends with a newline and one that doesn’t compare cleanly.
Side-by-side vs unified
Side-by-side (git diff --color-words style):
- Two columns, matching lines aligned across.
- Removed lines on the left have a red highlight, added lines on the right have green.
- Pairing: when a chunk of removals is followed by additions, the Nth removal is placed opposite the Nth addition; the longer side fills the rest of the rows.
Unified (git diff default):
- One column with
+and−markers in a gutter. - Compact for small diffs; harder to scan for large ones.
Privacy and security
The diff checker is a single HTML page with a small JavaScript bundle. Your text never leaves your device. The share link encodes state in the URL fragment (#…) — that part of a URL is not sent to servers. Verify in DevTools → Network: no outbound requests after the page loads.
Limitations
- No syntax highlighting inside diff rows (yet). The diff itself is highlighted; the code inside each row renders as monospace plain text.
- No three-way merge (the classic
git mergetoolUI). The tool compares two versions, not three. - No patch file output. You cannot paste a unified diff and recover the originals.
Related tools
- JSON Formatter & Error Reviewer — pretty-print before diffing.
- JSON ↔ YAML Converter — convert to a common format before comparing.
- Regex Tester — find patterns across one of the two versions.
Frequently asked questions
Is my text sent to a server?
No. Everything runs in your browser tab. Open DevTools → Network and you will see no outbound request with your input. The share link encodes state into the URL hash (#…), which the browser does not transmit to servers.
What is the difference between line, word, char, and JSON-aware mode?
Line mode is the classic diff: the unit is a whole line, additions and removals are full lines. Word mode highlights individual words that changed, useful for prose. Char mode is finest-grained, useful when you suspect a single letter difference. JSON-aware mode parses both sides as JSON and diffs the structures, so two JSON documents that differ only in key order are reported as identical.
What does "Ignore whitespace" do?
In line mode it trims leading and trailing whitespace from each line before comparing. So " foo " and "foo" match. Indentation changes between two otherwise-identical files become invisible. The option does not apply to word, char, or JSON modes.
Does the JSON-aware mode handle big files?
It parses both sides with JSON.parse and walks the structure, which scales to tens of megabytes in modern browsers. For multi-hundred-megabyte JSON use a streaming tool instead — this is built for the common case of comparing an API response, a config file, or a snapshot.
How is the side-by-side view aligned?
Equal lines align on the same row in both columns. When a chunk of lines is removed on the left and another chunk is added on the right (a substitution), the rows pair up by position — the first removal is opposite the first addition, and any extras spill into empty cells on the other side.
Can I diff two URLs or paste a diff/patch?
Not directly. The tool compares text or JSON pasted into the two panes. Patch files (unified or context format) are not parsed back — paste the two source versions instead.
Why does my one-character change show as a whole-line diff?
You are in line mode. Switch to word or char mode to see the smaller change highlighted in place.
Does line mode care about LF vs CRLF line endings?
No. Lines are split on either \\n or \\r\\n, so files written on Windows and Unix compare cleanly. Mixed endings within one file are also handled.
How do I share a diff with a teammate?
Click "Copy share link". Both texts plus your mode, view, and ignore-options are encoded into the URL fragment. Paste the URL in chat or a doc. No server stores the data — the link is the data.
Is the diff checker really free?
Yes. No signup, no account, no ads, no telemetry on your input. The source is on the project repository.