JSON Formatter
Format, validate, and minify JSON in your browser. Tree view with copyable paths. Nothing is uploaded to a server.
Runs entirely in your browser. Nothing is sent to our servers.
About this tool
Paste any JSON into the left panel and use Format to pretty-print it with
your chosen indentation, Minify to strip whitespace, or Validate to check
it parses without modifying it. All processing happens in your browser
via the native JSON.parse() / JSON.stringify() —
nothing is uploaded.
Common errors and how to read them
- Unexpected token usually means a stray comma, a missing quote, or single quotes around keys (JSON requires double quotes).
- Unexpected end of JSON means a brace or bracket isn't closed.
- Unexpected non-whitespace after the top-level value means there's content after the closing brace (often a trailing comma or an extra object).
The validator reports the character position of the error so you can jump straight to it.
Frequently asked questions
- Does this support JSON with comments (JSONC)?
- No. Standard JSON has no comment syntax, and this tool uses the strict native parser. If you have JSONC, strip the comments first.
- Why does the output preserve key order?
- Native
JSON.parsepreserves the order keys appeared in your input, andJSON.stringifywrites them back in that order. We don't alphabetize unless you ask for it. - How big can the input be?
- The browser limits matter more than the tool. Inputs in the tens of megabytes are usually fine; hundreds of megabytes will be slow or fail. For huge files, use a desktop tool like jq.
- Why doesn't the validator catch my schema errors?
- This tool only checks JSON syntax. Schema validation (required fields, types, formats) is a separate problem and needs a tool like AJV or a server-side validator.
Last updated: May 17, 2026