Local JSON formatter, query and diff workbench
Paste JSON to validate it locally, beautify or minify output, sort object keys, inspect structure and scalar paths, query a nested value with a JSONPath-lite selector, compare two payloads and copy or download the version you actually need.
Formatting and analysis run in your browser. Do not paste secrets into any online tool unless the environment is appropriate for that data.
A JSON formatter is most useful when it helps you debug
Indentation is only the first problem when a payload is hard to read. API responses, webhook bodies, configuration files, analytics exports and structured data drafts often need syntax validation, a quick way to find a nested value and a comparison against a known-good version. A formatter that only makes braces pretty still leaves you scrolling through the payload looking for the field that changed.
This JSON formatter keeps the everyday debug steps together. It parses in the browser, shows output as beautified, minified or sorted-key JSON, counts structure, builds a path explorer, runs a lightweight query such as $.tools[0].status or $.items[*].id, creates schema-style type hints and compares flattened scalar paths between two JSON documents. Copy and download actions are there because the useful result often needs to go back into code, a ticket or a configuration review.
How to read a JSON payload before changing it
Start with validity. A parser error usually tells you more than staring at the raw text: trailing commas, comments copied from JavaScript, unquoted keys, single quotes, undefined and NaN are common offenders. Once the file parses, check the shape. Arrays and objects explain how much nesting you are dealing with. Scalar paths expose the values that can change between responses. A focused query helps when the field is known but buried.
- Formatted output gives readable JSON, compact JSON or recursively sorted keys.
- Query result follows dot keys, bracket indexes and simple wildcards.
- Path explorer lists scalar values with their path and type.
- Schema hints sketches object and array types for documentation or validation planning.
- Diff spots changed, added and removed leaf values between two payloads.
Practical JSON checks for APIs and configs
If a webhook stops working, compare the failed payload with one that passed before guessing at the endpoint. If a setting file is rejected, validate raw JSON before sorting or minifying it so you do not hide the original error. If documentation is unclear, query the one nested branch you care about and inspect its type. When a value must obey business rules, use JSON Schema or application validation after this exploratory pass.
Privacy and workflow notes
Browser-side formatting is convenient, but data choice still matters. Redact tokens, customer records and production secrets before sharing screenshots or payloads. Keep a raw copy when you debug a parser problem. Use sorted keys when comparing shape, not when key order carries meaning for a human review. For massive files, move to a local editor or CLI parser when the browser becomes the bottleneck.
Common questions
Is this full JSONPath?
No. The query box supports a practical subset: root marker, dot keys, bracket indexes and wildcard steps for common inspection. Use a dedicated JSONPath library when filters, recursive descent or full query compatibility matter.
Does formatting repair invalid JSON?
No. It reports the parse problem and gives common hints. Repairing a payload automatically can change meaning, so the safer first step is to fix the source text deliberately.
Can I use this before JSON Schema validation?
Yes. The schema hints help you understand shape and field types, but they are not a formal contract. Use a schema validator when you need enforceable validation.
What is the difference between validating and formatting JSON?
Validation checks that the syntax is correct; formatting re-indents valid JSON so it is readable. A good formatter validates first and points at the error if the JSON is broken.
Why does my JSON fail with an unexpected token error?
The usual causes are trailing commas, single quotes instead of double quotes, unquoted keys, or comments. Strict JSON allows none of these.
Can I minify JSON to save space?
Yes. Minifying strips whitespace for a smaller payload. Use pretty-printed JSON while developing and minified JSON in production API responses.













