The useful JSON toolkit is not one giant website. It is six small operations: format, validate, compare, query, convert, and inspect. Keep sensitive payloads local—browser tools are convenient, but production tokens and customer records do not belong in a pasted demo.
Match the tool to the failure
| Task | Best first move | What it catches |
|---|---|---|
| Pretty-print | Indent consistently | Broken nesting and duplicated fields |
| Validate | Parse with a real JSON parser | Trailing commas, bad quotes, truncated payloads |
| Diff | Compare parsed trees | A changed value hidden by key ordering |
| Query | Use jq or JSONPath | The one field buried in a 2 MB response |
| Convert | Generate a schema or type from samples | Repetitive boilerplate, not correctness |
| Inspect | Look at types and array lengths | null where an object was expected |
Formatting is not validation
This is valid JavaScript but invalid JSON because JSON does not allow comments, single quotes, or trailing commas:
{ user: 'Mina', } // JavaScript object literal, not JSON
Use a parser as the final authority:
printf '%s' "$PAYLOAD" | jq .
jq exits non-zero for invalid JSON, which makes it useful in scripts and CI as well as at the terminal.
A formatter that “fixes” malformed input can hide the source of a production bug. Preserve the original payload until you know why it failed.
Diff objects, not strings
These payloads say the same thing but text diff makes them look unrelated:
{"enabled":true,"retries":3}
{"retries":3,"enabled":true}
Canonicalise or parse before comparing. Conversely, arrays are ordered in JSON; do not sort them to get a cleaner diff unless order is genuinely irrelevant to the API contract.
Type generators are a starting point
Generating a TypeScript interface from a sample response is quick, but a sample cannot prove optionality. A field absent from one fixture may be required in production; a field present once may be nullable. Keep the generated shape, then check it against the API schema or a broader fixture set.
For one-off local work, IO Tools' JSON tools are a reasonable browser option. For a repeatable build step, commit a schema and validate with the same library your service uses. The distinction matters: a browser tab helps investigate, while a schema prevents the regression from returning.
Small, local operations beat a mystery “JSON toolbox” when the payload is important and the diagnosis needs to be reproducible.
