JSON runs the modern web: API responses, configuration files, app settings, data exports. It is also unforgiving — one trailing comma or a single quote in the wrong place and the whole document fails to parse. The JSON Formatter & Validator on MMS Tools pretty-prints messy JSON so you can read it, minifies it when size matters, and validates it with the parser’s real error message when something is wrong. Everything happens in your browser, so it is safe for API keys and private data.
How to format and validate JSON, step by step
- Paste your JSON into the input box — an API response, a config file, a log line, anything.
- Choose an indent — 2 spaces (the most common style), 4 spaces, or a tab.
- Click “Format” to pretty-print it with neat indentation, “Minify” to strip it down to a single line, or “Validate only” to check it without changing anything.
- Read the result. Valid JSON shows a green “Valid JSON” confirmation and the formatted output. Invalid JSON shows the exact parser error instead.
- Click “Copy result” to take the formatted or minified JSON back to your editor.
The five errors that cause almost every failure
- Trailing commas — a comma after the last item in an object or array, like {"a": 1,}. JavaScript allows it; JSON does not.
- Single quotes — JSON strings must use double quotes: 'name' is invalid, "name" is correct.
- Unquoted keys — every key must be a double-quoted string: {name: "x"} is invalid.
- Comments — JSON has no comment syntax. A // note inside the document breaks it.
- Truncated copies — a response cut off mid-paste gives errors like “unexpected end of data”. Re-copy the whole document.
When the validator reports an error, it usually names the position. Fix that spot, validate again, and repeat — most documents come clean within two or three rounds.