--- title: "JSON formatter and validator — free, runs in your browser" description: "Pretty-print, minify and validate JSON, with the exact position of any error. Free, no sign-up, and nothing you enter leaves your browser." url: https://atoneplace.net/tools/json-formatter/ site: "At One Place" --- # JSON formatter and validator Pretty-print, minify and validate JSON, with the exact position of any error. ## How it works Formats JSON with indentation, minifies it back down, and validates it. When parsing fails, the error message and the position in the input are both reported, which is usually enough to find the problem immediately. The errors that account for most failures are all things JSON forbids and JavaScript allows: trailing commas after the last element, single quotes instead of double, unquoted keys, and comments. JSON has none of these. A file that works when pasted into JavaScript can still be invalid JSON. Everything runs in your browser, so it is safe to paste a payload containing keys or personal data. > This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected. ## Common questions ### Why is my JSON invalid when it looks fine? Usually a trailing comma, single quotes instead of double quotes, unquoted keys, or a comment. JSON permits none of those, though JavaScript does. ### Are comments allowed in JSON? No. The specification has no comment syntax. Formats like JSON5 and JSONC add them, but standard parsers reject them. ## Related pages - [Word and character counter](https://atoneplace.net/tools/word-counter/) - [Typing speed test](https://atoneplace.net/tools/typing-speed-test/) - [Remove duplicate lines](https://atoneplace.net/tools/remove-duplicate-lines/) - [Sort lines alphabetically](https://atoneplace.net/tools/sort-lines/) - [Text compare](https://atoneplace.net/tools/text-diff/) - [Regex tester](https://atoneplace.net/tools/regex-tester/) - [Case converter](https://atoneplace.net/tools/case-converter/) - [Remove empty lines](https://atoneplace.net/tools/remove-empty-lines/) - [Find and replace](https://atoneplace.net/tools/find-and-replace/) - [Readability checker](https://atoneplace.net/tools/readability-checker/)