Inspect a nested API response
Expose the object and array structure to find a particular property. Spaces inside strings and escaped line breaks remain part of the values.
Paste a JSON document, reindent it for easier review, minify it when needed, and quickly detect syntax errors before reuse.
Compact JSON can be valid yet difficult to inspect. This formatter lays out a document using two spaces, four spaces or tabs; minification removes unnecessary whitespace outside strings. It checks syntax before producing output, so you can inspect an API response, prepare configuration or shorten a test fixture while retaining the written values. Objects and arrays are supported alongside standalone JSON values: a quoted string, number, true or null can also form a valid document.
The first step checks JSON grammar. Comments, trailing commas, unquoted keys and single-quoted strings are rejected. JavaScript and JSON5 snippets therefore need an explicit conversion first; the formatter does not guess how to repair ambiguous input.
After validation, the engine scans the original tokens. It retains names, member order, escaped strings and numeric spellings while adjusting whitespace between tokens. Output is not rebuilt from JavaScript numbers: 9007199254740993, 1e400 and -0 retain their original spelling. Duplicate properties are also retained, although they make exchanges less interoperable.
This checks syntax rather than your data contract. A well-formed object can still lack a required identifier or contain an incorrect unit. Use JSON Schema validation for supported type, range and required-field constraints. Use JSON Compare when object member order should not affect a comparison.
Supply JSON without Markdown fences or log prefixes. If parsing fails, check quotes, separators and matching array or object delimiters.
Select two spaces, four spaces or tabs and format. Use minification to remove indentation; whitespace inside string values remains unchanged.
Review relevant sections before copying or downloading the JSON result. Editing the source or indentation hides the previous result until you run it again.
Expose the object and array structure to find a particular property. Spaces inside strings and escaped line breaks remain part of the values.
Choose indentation that matches your repository, then inspect the changes. Formatting does not sort keys or remove duplicate members.
Remove layout whitespace for a test or documentation example. This reduces the text size; it does not replace HTTP compression or reduce the amount of underlying data.
The large integer, exponent, negative zero, repeated key and escaped quote survive unchanged. Only whitespace outside tokens is removed.
Input
{ "z":9007199254740993,"z":1e400,"a":-0,"s":"a \" b" }Result
{"z":9007199254740993,"z":1e400,"a":-0,"s":"a \" b"}With two spaces, each member starts on a separate line. Empty objects and arrays stay compact without extra blank lines inside them.
Input
{"empty":[],"object":{}}Result
{
"empty": [],
"object": {}
}No. Output copies numeric tokens from the source rather than serializing parsed JavaScript numbers. A downstream application reading that JSON may still impose its own precision limits.
Those extensions are not JSON syntax. Remove them deliberately; the formatter does not silently discard them and risk changing the intended meaning.
No. Success confirms JSON grammar, not server rules. A schema can check supported additional constraints, while authorization and business rules need testing in your application.
The formatter keeps member order. JSON Compare checks two structures using its own comparison rules; that is a different task from preserving and laying out source tokens.
Related tools
Tools similar or complementary to this one.
Validate a JSON document against a schema and locate every error precisely.
Compare two JSON documents and highlight structural differences.
Convert JSON data to YAML or YAML data to JSON directly in your browser.
Understand ISO 8601 week numbers, Unix timestamps in seconds or milliseconds, and the difference between human-readable dates and technical time values.