flashman
← All guides

Text and JSON diff: compare changes with confidence

Side-by-side diffs for configs, API payloads, and code review prep.

2026-06-05 · 5 min read

  • diff
  • debug

Diff tools highlight insertions and deletions between two text blobs. They are essential when comparing API responses before/after a deploy, config files across environments, or generated output from refactors.

When to diff JSON

Format both sides identically first (sorted keys, consistent indentation) so diffs show semantic changes, not whitespace noise. Use a JSON formatter before pasting into a diff view.

Common pitfalls

Strip volatile fields (request IDs, timestamps) when comparing API contracts.

  • Trailing newlines flagged as changes
  • Key reordering in unsorted JSON
  • Timestamps that change every request masking real diffs

Review workflow

Save before/after snapshots in tickets. Link the diff output in PR descriptions when config changes are hard to eyeball.

Try these tools