Skip to main content

Developer Tools

JSON Formatter & Validator

Validate JSON, pretty-print it, minify it, and inspect JSON paths.

JSON Formatter & Validator tool

Loading tool…

Jump to a section

About This Tool

Format minified or hard-to-read JSON into highlighted, indented output that is easier to inspect, debug, and share. The tool also validates the input, shows a parser error when the JSON syntax is invalid, provides an expandable tree view, and lists JSON paths for objects, arrays, and nested values.

How To Use It

  1. Paste JSON into the input editor.
  2. Keep the input at or below 1,000,000 characters so formatting remains responsive in the browser.
  3. Choose 2-space or 4-space indentation, and turn on key sorting when you want stable object order for review or diffs.
  4. Use the highlighted preview, validation message, tree view, stats, and JSON path list to check the structure.
  5. Expand or collapse the full tree when you need to scan deeply nested JSON faster.
  6. Filter paths when you need a specific key or value.
  7. Copy the formatted JSON, minified JSON, or an individual JSON path, or send formatted or minified output back into the input for another pass.

Examples

Pretty-print an API response

Paste a compact response such as {"status":"ok","items":[1,2]} and convert it into readable nested JSON.

Find a nested value path

Expand the tree view or filter the path list for a key such as userId or items to copy the matching path for debugging, notes, or test fixtures.

Minify edited JSON

After checking and formatting a payload, use the minified result as the input or copy it when you need a compact value for a config field or request body.

Normalize JSON before a diff

Turn on key sorting to alphabetize object keys before copying formatted JSON into a code review, notes, or a diff tool.

Useful Notes

What validation checks

The parser checks JSON syntax, including quotes, commas, brackets, braces, and valid primitive values. It does not verify an API-specific schema.

How paths are shown

Simple property names use dot notation, while keys with spaces, punctuation, or other special characters use bracket notation so the path stays unambiguous.

When to use the tree view

Use the tree view when you need to follow nested objects or arrays step by step without scanning the entire formatted document.

What key sorting changes

Key sorting alphabetizes object properties at every nesting level while preserving array item order and primitive values.

Local processing

Formatting and validation use browser JavaScript, so pasted JSON is processed on the page instead of being uploaded by this tool.

FAQ

Is my JSON uploaded?

No. JSON parsing, formatting, minifying, and stats are handled in your browser.

Can this validate a JSON schema?

No. This tool validates JSON syntax only; it does not compare the data against a custom schema.

Why does valid JavaScript object syntax fail?

JSON requires double-quoted property names and does not allow comments, trailing commas, undefined, or functions.