JSON formatter and validator

Format, minify and check your JSON for syntax errors

Paste your JSON and get it neatly formatted with a two-space indent, or minified into a single line, with any syntax error highlighted at its exact location. When something is broken, the message explains in English what is likely missing: a comma, a bracket, double quotes around a key name, or extra content after the end of the JSON. It usually points out the exact row and column. You can copy the result or download it as a data.json file. This is useful for reading API responses, checking configuration files before uploading, and compressing data before sending. Everything runs in the browser, and the data never leaves your computer.

Frequently asked questions

Is there a size limit?

There is no limit in the code. Files of a few megabytes process without issue, but massive files might slow down your browser because all the processing is done in its memory.

Why is my JSON invalid with single quotes?

The JSON standard requires double quotes around key names and strings. A key without quotes or with single quotes will fail the validation, and the tool will tell you on which line.

Is a comma after the last item an error?

Yes. In JavaScript, you can leave a trailing comma after the last item in a list or object, but in JSON it is illegal. This is one of the most common reasons for an error in a manually written file.

What is minification?

Removing all spaces and line breaks so the JSON sits on a single line. The data remains exactly the same, and the file is smaller for sending to an API or for saving.

Is my data sent to a server?

No. The validation and formatting are done entirely in your browser, so you can safely paste configuration files containing keys or customer data.

More tools you might need

All tools in Developers and AI