JSON Formatter
Format, validate and minify JSON. Runs in your browser.
How to use
Paste your JSON into the input box and press Format. Choose 2 spaces, 4 spaces or tabs for indentation.
If the JSON is invalid, you'll see the error with its line and column so you can fix it quickly.
Press Minify to strip all whitespace, or Copy to copy the result to your clipboard.
FAQ
Is my data sent anywhere?
No. This tool runs entirely in your browser. Nothing you type, paste or upload is sent to a server or stored anywhere.
What's the difference between format and minify?
Formatting adds line breaks and indentation so JSON is easy to read. Minifying removes all unnecessary whitespace so the JSON is as small as possible.
Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments. JSON allows none of these.