JSON formatter & validator

Paste JSON, get it pretty-printed or minified, with clear errors when it will not parse.

Format, minify, validate

Format pretty-prints your JSON with consistent indentation so structure becomes readable. Minify strips every unnecessary space and newline, shrinking payloads for APIs and config where bytes matter. Both parse the input first, so either button doubles as a validator: if the JSON is broken, you get the error and its position instead of silent nonsense.

Everything runs in your browser. API responses, tokens and config files never leave your machine.

The errors that catch everyone

Trailing comma
{"a": 1, "b": 2,}  →  delete the comma before the closing brace
Single quotes
{'name': 'Ada'}  →  JSON requires double quotes: {"name": "Ada"}
Unquoted keys
{name: "Ada"}  →  valid JavaScript, invalid JSON. Quote the key.

JSON in one paragraph

JSON (JavaScript Object Notation) is the plain-text data format most of the modern web speaks: objects in braces, arrays in brackets, strings in double quotes, plus numbers, booleans and null. It is stricter than JavaScript itself, which is precisely why it is so portable, and why a validator is worth keeping within reach whenever you are hand-editing config files or debugging an API.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Formatting and validation happen entirely in your browser with JavaScript. Your data never leaves your device, which makes this safe to use with API responses and config files you would not paste into an unknown website.

Why does a trailing comma break my JSON?

The JSON specification does not allow a comma after the last item in an object or array, even though JavaScript itself tolerates it. Deleting the final comma before a closing bracket or brace fixes the most common JSON error there is.

Can I use single quotes in JSON?

No. JSON requires double quotes around both keys and string values. Single quotes are valid in JavaScript objects but not in JSON, which is a stricter format.

What does an error like Unexpected token mean?

The parser met a character it could not accept at that position: often a missing comma, an unquoted key, a stray bracket or a trailing comma. The error message includes the position, and formatting progressively smaller chunks of the document is the quickest way to corner the culprit.

Does formatting change my data or reorder keys?

No. Pretty printing and minifying only change whitespace. Key order, values and structure all stay exactly as they were.

Related tools