Different jobs, same language. The Formatter works on one document and changes how it looks; the Diff works on two documents and shows you what changed between them. They answer different questions — and in a review workflow you'll often reach for them together.

Use the Diff when

  • You have two versions of a document and need to know exactly what changed.
  • You're reviewing a config or payload change before it goes out.
  • You're comparing two API responses — before and after a change, or two endpoints.
  • You're hunting a regression: something worked before, and you need to see what moved.

Use the Formatter when

  • You have one document that's cramped or minified and you need to read or edit it.
  • You want consistent indentation — 2-space, 4-space, or tabs — to match a codebase.
  • You want to sort object keys alphabetically so future diffs stay stable.
  • You're preparing JSON to paste into a file, a commit, or a colleague's editor.

Side by side

JSON DiffJSON Formatter
Primary jobShow what changed between two documentsMake one document readable
InputTwo JSON documents (A and B)One JSON document
OutputAdded / removed / changed lines + a similarity scorePretty-printed JSON
Changes your data?Never — read-only comparisonRe-indents only — data untouched
Sort keysYes (optional)
Typical questionWhat changed?How should this look?
Runs 100% locallyYesYes
under the hood

Complementary, not competing. The Formatter never compares and the Diff never rewrites — so a safe workflow is to format each version, then diff the two formatted copies and read exactly what moved, with no cosmetic noise in the way.

bottom line

Reach for the Formatter when you have one document and want to read it; reach for the Diff when you have two and need to know what changed. A clean review habit: format each version first so you're comparing like with like, then diff the two.