Paste your JSON to format, validate, or minify it instantly
JSON (JavaScript Object Notation) is a text-based data interchange format derived from JavaScript object syntax. It uses key-value pairs ({"key": "value"}), arrays ([1, 2, 3]), nested objects, strings, numbers, booleans, and null. It is the standard format for REST APIs, configuration files, and NoSQL databases.
Trailing comma: {"a": 1,} — JSON does not allow trailing commas after the last item. Remove the comma.
Single quotes: {'key': 'value'} — JSON requires double quotes for all strings and keys.
Unquoted key: {key: "value"} — All keys must be quoted strings.
Unescaped special characters: Backslashes (\), quotes ("), and control characters inside strings must be escaped.
Comments: JSON does not support // comments or /* block comments */. Remove all comments before parsing.
Paste raw JSON (minified or malformed) into the input and click Format. Valid JSON is indented with 2-space indentation. Invalid JSON shows the error type and position so you can fix it. Use Minify to compress formatted JSON back to a single line for API requests or storage.
JSON is more compact than XML and easier to read than CSV for nested data. YAML is more human-friendly but less strict. JSON5 (a superset) allows comments and trailing commas but is not supported natively by most parsers. For most API and configuration use cases, standard JSON is the right choice.