JSON Formatter & Validator
How to format JSON
Paste your JSON and press Format to pretty-print it with 2 spaces, 4 spaces or tabs. Press Minify to strip whitespace for production use. The validator checks your JSON as you type and points to the exact line and column of any error.
FAQ
What is the difference between formatting and minifying?
Formatting adds line breaks and indentation so JSON is easy to read. Minifying removes all unnecessary whitespace to make it as small as possible.
Can I indent JSON with tabs?
Yes. Choose Tabs in the Indentation menu before pressing Format. You can also pick 2 or 4 spaces.
Is there a size limit?
Yes, up to 10 MB of JSON. For larger files, use a desktop editor or a command-line tool.
Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments. The validator shows the line and column of the first error.