JSON Formatter & Validator
Format, minify, and validate JSON instantly in your browser.
How to use this tool
Paste your JSON into the input box on the left (or click Load sample to try an example), then click Format to pretty-print it, Minify to compress it onto a single line, or Validate to check whether it's valid JSON. The result appears in the output box on the right, and any errors are shown above the input. Pasted a JavaScript object or Python dict, or JSON with comments or trailing commas? Click Fix JSON to repair it and format it in one step. Switch on Auto update to have the result refresh as you type instead of clicking each time.
FAQ
Is this JSON formatter free to use?
Yes, this tool is completely free to use with no limits on how often you can use it.
Does my JSON data get uploaded anywhere?
No. All formatting, minifying, and validation happens directly in your browser. Your data never leaves your computer.
What happens if my JSON is invalid?
The tool will show a clear error message describing what's wrong with your JSON so you can fix it quickly. If the problem is a common one, like single quotes, unquoted keys, comments, or trailing commas, it will also offer a Fix JSON button that repairs it for you.
What can Fix JSON repair?
Single or curly quotes, unquoted keys, trailing or missing commas, comments, Python and JavaScript values like True, None, and undefined, numbers like .5 or +1, a leading const x = assignment, and brackets left open by a truncated paste. It won't guess at text values that are missing their quotes, and Format, Minify, and Validate stay strict so a Valid result always means valid JSON.