JSON Formatter
Validate and pretty-print JSON, right in your browser.
Part of developer tools.
What this tool does
Paste raw JSON and it is parsed and re-printed with consistent indentation, so nested objects and arrays line up and become readable. If the text is not valid JSON, the parser error is shown instead — including where it gave up — which makes this a validator as much as a formatter.
The “Minify” option does the reverse: it strips every space and newline to produce the smallest equivalent JSON, which is what you want when embedding a payload in a config file, a query string, or a test fixture.
Common mistakes it catches
The errors that bite most often are a trailing comma after the last item, single quotes instead of double quotes around keys or strings, unquoted keys copied out of JavaScript object literals, and a stray character pasted in from a terminal or a log line. All four are rejected by the strict JSON grammar, and all four are easy to miss by eye in a long payload.
Is my data safe?
Yes. The parsing happens in your own browser using its built-in JSON engine — nothing you paste is sent to a server, so you can safely format payloads containing API responses, tokens or customer data. The page loads no ads, no analytics and no third-party scripts of any kind.
More data tools
- JSON Validator — Check whether JSON is valid and see the exact line and column of the error.
- JSON Diff — Compare two JSON documents by structure and list every added, removed or changed value.
- JSON to CSV Converter — Turn a JSON array into a CSV file, with nested keys flattened into columns.
- CSV to JSON Converter — Turn a CSV file with a header row into a JSON array, with numbers and booleans typed.
- JSON to YAML Converter — Convert JSON into clean, indented YAML for configs and manifests.
- YAML to JSON Converter — Convert YAML to JSON, with anchors, aliases and multi-document files resolved.
- XML to JSON Converter — Convert an XML document into JSON, attributes and repeated elements included.
- JSON to XML Converter — Convert JSON into a well-formed, indented XML document.
- JSON to TypeScript — Generate TypeScript interfaces from a sample JSON payload.
- XML Formatter — Pretty-print or minify XML and catch malformed tags, right in your browser.
- SQL Formatter — Format SQL queries with consistent indentation and upper-case keywords, per dialect.