JSON Formatter
Format, minify and validate JSON. When the input is invalid, the line and column where parsing stopped are shown.
Runs in your browser. Nothing you enter is uploaded.
01How to use the JSON Formatter
- 01Paste JSON into the input.
- 02The status bar shows whether it is valid as you type.
- 03Press Format or Minify, then Copy or Download the result.
02How validation works
Input is parsed with the browser’s built-in JSON parser, which follows the JSON standard (RFC 8259). Not valid JSON: comments, trailing commas, single-quoted strings, unquoted keys, NaN and undefined.
03Examples
{"name":"Ada","tags":["math","code"]} formats to an indented object with two keys.
A trailing comma such as [1, 2,] is reported at the closing bracket.
Minify removes all whitespace outside strings to make the smallest valid output.
04Frequently asked questions
Is my JSON sent anywhere?
No. Parsing and formatting run in your browser. Nothing you paste is uploaded.
Why is JSON with comments rejected?
Comments are not part of the JSON standard. Formats such as JSONC or JSON5 allow them, but standard parsers do not.
How large a file can it handle?
Several megabytes usually work well. Very large files depend on your device’s memory and may make the tab slow.