Compare text and JSON without losing the real change
You paste two versions of the same file, API response, or config. The job is to see what actually changed, not to stare at two walls of text. This Diff Checker compares Original and Modified in your browser and highlights line and word differences.
Use Plain text when the bytes matter: env files, SQL dumps, source snippets, or logs. Use JSON when you are comparing payloads and you do not want formatting or key order to invent a fake diff.
The comparison uses the jsdiff library in the page. Nothing you paste is uploaded.
If you only need to pretty-print one payload first, use the JSON Formatter & Validator.
Text mode vs JSON mode
Plain text diffs the strings as pasted, after normalizing Windows and old Mac line endings to \n. A moved space, a reordered line, or a renamed identifier all show up.
JSON parses each side, optionally sorts object keys, then pretty-prints with 2-space indent. The line diff runs on that normalized text. That is the right mode when one response is minified and the other is formatted, or when two clients serialized the same object with keys in a different order.
If either side is not valid JSON, the tool stops and names the side that failed. It does not guess. It also does not try to diff YAML, XML, or JavaScript objects unless you stay in text mode.
Why key order creates fake diffs
RFC 8259 says a JSON object is an unordered collection of name/value pairs. These two values are the same object:
{"plan":"team","id":"usr_18"}
{"id":"usr_18","plan":"team"}
A text diff reports every line as changed. JSON mode with Ignore key order sorts keys on both sides first, so this pair produces an empty diff.
The opposite case looks almost identical and is a real change. Pretty-printed copies of the sample payload differ only in plan, seats, and a new sso flag. Load Sample to see that nested change highlighted instead of a whole-file rewrite.
Turn Ignore key order off when you are debugging a serializer and the order itself is the bug.
Common use cases
- API responses. Compare yesterday’s fixture with the live payload after a deploy.
- Env files. Diff two
.envcopies before a release and ignore blank-line noise with Ignore whitespace. - SQL dumps or schema snippets. Text mode shows added columns without a database UI.
- Code review snippets. Paste two function versions when you do not want to open a full git tool.
- Minified vs formatted JSON. JSON mode formats both sides first so you are not diffing one giant line against a pretty file.
How to use
- Choose Plain text or JSON.
- Paste the older version into Original and the newer version into Modified, or use Upload / drag and drop.
- Optionally turn on Ignore whitespace, Ignore key order (JSON), or Fold unchanged.
- Switch Side-by-side or Unified to read the result.
- Use Previous Change and Next Change to jump between edits.
- Copy Diff or Download to save a unified
.difffile.
Load Sample fills in a minified user-plan payload and an updated team-plan payload so you can see JSON mode immediately.
Privacy
Original and Modified text never leave the browser. There is no compare API and no share link that uploads content. Clear the page or close the tab to drop the inputs. File drops are read locally with the FileReader API.
Frequently Asked Questions
What is the difference between text diff and JSON diff?
Text mode compares the characters you pasted. JSON mode parses both sides first, pretty-prints them, and then diffs the result. That lets you ignore key order and compare a minified payload to a formatted one.
Can I ignore key order?
Yes, in JSON mode. Turn on Ignore key order to sort object keys on both sides before comparing. Two objects with the same keys and values then match even if the keys were written in a different order.
Does this upload my files?
No. The comparison runs in your browser with the jsdiff library. The page does not send Original or Modified text to a server.
How large can the inputs be?
Each side is limited to 1,000,000 characters, about 1 MB of text. Larger files can freeze the tab, so the tool stops and asks you to trim the input.
Can I compare minified JSON to pretty JSON?
Yes. Switch to JSON mode. Both sides are parsed and formatted with the same indentation, so a one-line payload can be compared to a multi-line copy of the same object.
Why do whitespace-only changes show up?
Text mode treats spaces and tabs as real changes. Turn on Ignore whitespace to hide those. JSON mode already normalizes indentation when it pretty-prints, so leftover space noise is much smaller there.