JSON Formatter
Format, validate, and minify JSON — instantly, in your browser.
How to use
Paste your JSON, then click Format to pretty-print it or Minify to compress it. Invalid JSON shows the exact error position.
About this tool
Paste messy or minified JSON and get it beautifully formatted with proper indentation, or minified to a single line. It validates as you go and points to the exact position of any syntax error. Everything runs locally in your browser — your data never leaves your device.
What you can use JSON Formatter for
- Pretty-print a minified API response to read it
- Validate that a config file is well-formed JSON
- Minify JSON before pasting it into code or a URL
- Spot the exact position of a JSON syntax error
Frequently asked questions
Is my JSON sent to a server?
No. All formatting and validation happen locally in your browser — nothing is uploaded, so it's safe for sensitive data.
What indentation does it use?
Format uses 2-space indentation. Use Minify to strip all whitespace into a single compact line.
Does it show where an error is?
Yes — invalid JSON reports the parser's error message, which includes the position of the problem.