JSON Formatter & Validator
Beautify, validate and minify JSON — with clear error locations.
About this json formatter & validator
JSON is the standard format for APIs, config files and data exchange, but it's often delivered minified on one long line or broken by a stray comma. Paste it here to format it with clean indentation, validate it, and get the exact line and column of any syntax error.
Switch to Minify to strip whitespace for production, and sort keys alphabetically to make two JSON documents easier to compare. Your data is processed locally and never uploaded — safe for API keys and customer data.
How to use the JSON Formatter & Validator
- Paste your JSON.
- Choose Beautify or Minify, and the indent size.
- Fix any error at the reported line and column.
- Copy or download the result.
Common JSON errors
JSON requires double quotes around keys and strings, doesn't allow trailing commas after the last item, and doesn't support comments or single quotes. Numbers can't have leading zeros, and values must be strings, numbers, true, false, null, objects or arrays.
Worked example
{"name":"ToolsKingMaster","free":true} beautified with 2 spaces puts each key on its own indented line, making nested data easy to read.
Tips for better results
- If you see "Unexpected token", look just before the reported position for a missing comma or quote.
- Use Base64 decoding first if your JSON is encoded, e.g. inside a JWT.
Frequently asked questions
Is my JSON sent to a server?
No. Parsing and formatting happen in your browser.
Does JSON allow comments?
No. Standard JSON doesn't support comments; remove them before validating.
Last reviewed: October 2026 · Results are calculated in your browser.