JSON Formatter & Validator

Format, validate and minify JSON in your browser. Invalid JSON is reported with the line and column of the error. Nothing is sent to a server.

JSON is the format most APIs speak, and it is easy to read when formatted and impossible when it arrives as one long line. This tool formats JSON with proper indentation, minifies it back to a compact single line, and validates it, telling you the exact line and column of any syntax error. Everything happens in your browser.

Finding the error

The most useful thing a JSON tool can do is tell you where it broke. A misplaced comma or a missing bracket in a large document is painful to find by eye. When the input is invalid, this tool reports the line and column of the problem, so you can go straight to it.

Common JSON mistakes

The usual culprits are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, and comments, none of which are allowed in strict JSON even though JavaScript permits some of them. If your JSON was hand-edited or copied from code, those are the first things to check.

Frequently asked questions