Skip to content
TypeParser
All tools

Diff Checker

Diff text, JSON, and .env without false positives.

beats diffchecker.com edge: JSON-aware key diff + .env mode + ignore-whitespace
left
right
diff
mode view
paste both sides to diff
Guide

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

  1. Paste the original on the left, the new version on the right.
  2. Pick the mode that matches your data.
  3. Toggle ignore-whitespace if formatting differences are noise.
  4. Toggle inline vs side-by-side based on screen width and reading preference.
  5. 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 text diff treats {"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?
Splits each side on =, 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?
No. Pasting, parsing, and diffing all run locally. The textarea contents never reach a server, so it is safe to diff production configs, environment files, or PR snippets.
How do I generate a unified patch?
Toggle the Patch output mode. The diff renders as standard unified-diff format — --- 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?
Toggle Ignore whitespace. Trailing spaces, tab/space mixes, and CRLF/LF differences all collapse. Useful when comparing files saved by editors with different settings.
Can it diff very long files?
Yes — the diff runs on a Web Worker. Files up to ~5 MB compare in well under a second. Above that, prefer command-line diff or git diff --no-index.

Related tools

Last updated: 2025-01-15