Developer Tool
JSON Formatter & Validator
Pretty-print, minify and check JSON, with the position of any syntax error.
Runs in your browser — nothing is uploaded
What this does
JSON is the text format most web APIs send and receive, and most JSON problems are small: a trailing comma, a single quote where a double quote belongs, or a missing bracket at the end of a long payload. This tool parses what you paste with your browser's own JSON parser — the same one JavaScript code uses — and either lays it out readably or tells you where parsing stopped.
Nothing you paste leaves this page. There is no server behind this tool; the parsing happens in your browser tab.
How to use it
- Paste JSON into the input box.
- Choose an indent size, then press Format to lay it out, or Minify to strip every unnecessary space.
- If the JSON is invalid, read the error under the box. When your browser reports a character position, the tool converts it into a line and column so you can find it.
- Copy the result with the Copy button.
Where it stops being right
- It follows strict JSON: comments, trailing commas and single-quoted strings are errors, because standard JSON parsers reject them too.
- Whole numbers larger than 9,007,199,254,740,991 lose precision when parsed in JavaScript, so formatted output can differ from the input for those values.
- If an object repeats a key, only the last value survives formatting.
Questions
- Why does JSON with a trailing comma fail here?
- Because a trailing comma is not valid JSON. JavaScript object literals allow one, which is why it catches people out, but the JSON format itself does not, and a strict parser rejects it.
- Is my JSON sent to a server?
- No. The tool runs entirely in your browser and makes no network request with your data.
- What is the difference between formatting and minifying?
- Formatting adds line breaks and indentation so a person can read the structure. Minifying removes all optional whitespace so the text is as small as possible. Both describe exactly the same data.
More developer tools
- UUID GeneratorGenerate random version 4 UUIDs, one at a time or in bulk.
- Unix Timestamp ConverterTurn a Unix timestamp into a readable date, or a date into a timestamp.
- Base64 Encoder & DecoderConvert text to Base64 and back, with correct handling of non-English characters.
- URL Encoder & DecoderPercent-encode text for use in a URL, or decode an encoded URL back into readable text.