JSON Formatter, Diff and Tree Viewer: Compare and Explore Payloads

JSON Formatter, Diff and Tree Viewer: Compare and Explore Payloads

Format, diff two API responses and explore deep JSON — a no-install debug workflow.

02.08.2026
9 min read
Share this article:
JSON
Formatter
Diff
Tree viewer
Debugging
Tutorial

Three complementary tools for JSON debugging

Once syntax is valid, the real work begins: reading a minified payload, spotting what changed between two API versions, or navigating a deeply nested config with thousands of lines. The online JSON formatter makes a compact document readable in one click — 2 or 4 space indentation, tabs, without altering data. JSON diff compares two documents side by side and lists modified, added or removed paths. The JSON tree viewer collapses deep branches, highlights search results and avoids scrolling endless lines. These three tools on the JSON tools hub run entirely in the browser — no server upload. If JSON is invalid, start with the validate and repair JSON guide before formatting or comparing.

Format without changing values — only whitespace and indentation
Structural diff with JSON paths and keys-only mode for schema drift
Collapsible tree with search on keys and string values
Full workflow: validate → format → explore → compare → minify
100% local — ideal for API payloads, configs and secrets

Best practices and honest limits

Recommended order in the workflow

Formatting or comparing invalid JSON produces frustrating errors. Follow the order: validate (and repair if needed) → format or explore → diff → minify for prod.

Do not rely on the formatter to fix syntax — it parses strictly
Diff compares parsed structure, not raw line-by-line text
Tree viewer is read-only — no inline editing
For versioned fixtures, enable key sorting before diff to reduce noise
Document the workflow in your team: validator → formatter → diff on PR review
Limits to know

Each tool has a precise scope — do not expect a full IDE or automatic merge.

Diff: array element order matters — reordering = change
Diff: no direct YAML/XML comparison — convert to JSON first
Tree viewer: very large files may slow mobile browsers
Formatter: does not minify — use minify-json to reduce size
Escape/unescape: strings only, not entire JSON documents

Formatter, diff and tree: when to use each tool

JSON Formatter — beautify for review

The JSON formatter parses input, verifies it is valid, then rewrites the document with consistent indentation. Numbers, key order and strings stay identical — only whitespace changes.

2-space, 4-space or tab indentation to match your style guide
Optional key sorting (off by default) for stable diffs between commits
Invalid input → error message; fix first or use json-repair
Complement to the minifier: formatter = readability, minify-json = payload size
Same Monaco editor as the validator — consistent hub experience
JSON Diff — compare two versions structurally

JSON diff requires two valid documents. It flags modified values, added or removed keys and type changes — with JSON Pointer paths to locate each delta.

Positional array comparison — reordering may appear as a change
Keys-only mode: ignores value edits, useful for schema shape checks
Summary of affected paths — ideal for config reviews or API regressions
Both panels must parse before Compare — validate or repair upstream
For free text (not JSON), use the text diff on the utilities hub
JSON Tree Viewer — explore without an IDE

The JSON tree viewer builds an interactive tree after successful parse. Depth ≥ 2 collapsed by default on large docs; search on keys and string values; expand all / collapse all for very deep payloads.

Read-only — edit elsewhere then re-paste to refresh the tree
Ideal for unknown API responses during integration or bulky config exports
Very large documents may stress mobile browsers — Chrome desktop recommended
Chain with json-diff after locating the suspicious branch
Complements json-formatter: format for line reading, tree for depth navigation
Escape / unescape — quick mention

When your JSON contains multiline strings, quotes or sequences copied from devtools, the JSON escape tool (Escape and Unescape tabs) prepares or restores literals via native JSON.stringify / JSON.parse — before formatting or exploring.

Escape: plain text → escaped content for a JSON string value
Unescape: \n, \" sequences restored to readable text
Optional forward-slash escaping for embedding in HTML script tags
Local processing — no auto-convert on keystroke, explicit Convert click

Debug workflow: format, explore, compare

Scenario 1 — Unreadable minified API response

You copy a 200 response from Network devtools — a single line of several KB.

1

Step 1: Validate (if unsure)

Paste into the JSON validator. Syntax error? See the repair guide before continuing.

2

Step 2: Format

Open the JSON formatter, pick 2 or 4 spaces, click Format. The document becomes readable without changing data.

3

Step 3: Explore in tree (optional)

For a deeply nested object, paste the same output into the JSON tree viewer — collapse useless branches and search for a specific key.

Scenario 2 — Regression between staging and production

Two config or API response snapshots must be compared before deployment.

1

Step 1: Normalize (optional)

Format both documents with the same indentation style — or enable key sorting on the formatter for stabler diffs.

2

Step 2: Compare

Paste original on the left and new version on the right in JSON diff. The table lists each modified path.

3

Step 3: Drill into the delta

Suspicious path? Copy the branch into the tree viewer or reformat only that section for team review.

More on the JSON hub

These tools fit into a broader pipeline on the JSON tools hub.

json-formatter: beautify with configurable indentation and optional key sort
json-diff: structural comparison, keys-only mode for schema drift
json-tree-viewer: collapsible tree, search, expand all / collapse all
json-escape: prepare or restore escaped strings before integration
json-validator + json-repair: always upstream when syntax is doubtful
minify-json: compact the final payload before production send

Conclusion

Debugging JSON should not require installing an extension or uploading sensitive payloads to a third-party server. Format to read, explore in a tree to navigate, compare to validate regressions — all locally on FastMinify. Chain validation and minification when you are ready to ship.

Always validate syntax before formatting or comparing
Use diff in keys-only mode to verify schema shape
Tree viewer excels on nested configs — not for editing
Normalize indentation (or sort keys) before a diff review
See the validate/repair JSON guide for broken payloads
Share this article
Share this article: