About Diff Checker
Compare two texts and see exactly what changed — line-by-line for plain text, structurally for JSON, key-by-key for <code>.env</code> files. JSON mode treats keys as unordered so reordered objects do not show as changes. Toggle ignore-whitespace, toggle inline vs side-by-side. Everything runs locally — paste production configs without anxiety.
What “diff” really means
A diff is the minimal edit script transforming one input into another — the smallest set of insertions, deletions, and replacements that explains the change. Algorithmically: longest common subsequence, then everything else is the diff. The output’s quality depends on the granularity (byte, character, token, line) and the awareness of structure.
Plain-text diffs work line-by-line. They are universal and simple, but they choke on structured data — reorder a JSON object’s keys and a text diff lights up like a Christmas tree even though nothing meaningful changed.
Three modes, three trade-offs
- Text — line-by-line, the default. Use for code, prose, logs, raw output.
- JSON — parse both sides, compare structurally. Keys unordered, arrays positional. Useful for API contract diffs, config drift, RPC payload comparison.
- .env — split on
=, compare as a key/value set. Masks values by default. Useful for verifying environment promotions across staging → production.
How to use it
- Paste the original on the left, the new version on the right.
- Pick the mode that matches your data.
- Toggle ignore-whitespace if formatting differences are noise.
- Toggle inline vs side-by-side based on screen width and reading preference.
- Copy the output as patch, GitHub-flavored markdown, or HTML.
Common workflows
Code review without context-switch. Paste two snippets, hit go, eyeball. Saves opening a worktree just to verify a refactor preserved behavior.
Config drift audit. Paste prod’s config and staging’s config in JSON mode. Real differences pop; cosmetic key-order differences vanish.
Environment promotion. .env mode shows added, removed, and modified vars between two environments. Use it as the final check before you push staging values to prod.
Generate a patch. Make changes in two text panes, toggle the Patch output, copy the unified diff into a review tool or git apply.
Why local diffing wins
The data you most want to diff — production env files, internal API payloads, snapshot tests with PII — is exactly the data you should not paste into a remote diff service. This tool runs entirely in your browser. Open DevTools → Network → confirm: no requests fire when you paste or run the diff.
Frequently asked questions
How does JSON diff differ from text diff?
{"a":1,"b":2} and {"b":2,"a":1} as different — different byte sequences. JSON mode parses both, walks the trees, and reports only real value changes. Critical for diffing serialized configs that round-trip through different libraries.What does .env mode do?
=, treats keys as unordered, and reports added / removed / modified env vars — masking the values by default to avoid leaking secrets when you screenshot or share.Are my diffs sent to a server?
How do I generate a unified patch?
--- old / +++ new headers, hunks with @@ markers — ready to git apply or paste into a code review.Why are my diffs showing whitespace changes I do not care about?
Can it diff very long files?
diff or git diff --no-index.Related tools
Last updated: 2025-01-15