
JSON Formatter
Pretty-print JSON with a two-space indent, and show the parse error when the text is invalid.
Format reprints the JSON with a two-space indent.
- 1Paste JSON.
- 2Press Format.
- 3Copy the result, or read the parse error.
About this tool
Paste JSON that arrived as one long line and press Format for a two-space indent. Invalid JSON shows the parse error and leaves your text alone.
- The page doesn't fetch a URL
- It doesn't validate a schema beyond the parse
- Handy for an API body or a config blob
Questions
- Does it change the order of keys?
- No. Format reprints the JSON as it was, with a two-space indent.
- Are comments allowed?
- No. JSON does not allow comments, and the error will say so.
- Does it minify?
- No. This page only pretty-prints. Remove the whitespace in your editor if you need a compact file.
Ratings
No ratings yet. The average shows after 3 ratings.
Ratings come from people using this tool. Nobody is paid or rewarded for them, and written reviews are checked for spam before they appear, not for whether they are positive.
Related tools
- YAML FormatterNormalize YAML indentation so nested keys are easier to read.
- XML FormatterPretty-print XML with line breaks and indentation.
- SQL FormatterBreak a SQL statement onto new lines at common clauses so it is easier to read.
Base64Encode text or a file up to 8 MB into Base64, or decode Base64 text back into text.
CSV and JSONConvert a CSV table to JSON, or a JSON table to CSV, keeping commas that sit inside quotes.
URL encode and decodeEncode text as a URL query value, or decode percent-escapes back into text.
JWT decoderRead the header, payload, and expiration time of a JSON Web Token.
UUID v4 GeneratorGenerate one version-4 UUID from the browser's random source.