JSON Formatter

Paste JSON to validate, pretty-print, or minify it. Nothing is uploaded — everything runs in your browser.

Frequently Asked Questions

What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for storing and transmitting structured data. It supports strings, numbers, booleans, arrays, objects, and null. It's the most widely used format for web APIs.
What makes JSON invalid?
The most common causes are: trailing commas after the last item in an object or array, single quotes instead of double quotes around strings or keys, unquoted keys, missing commas between items, and comments (standard JSON does not support comments).
What is the difference between formatted and minified JSON?
Formatted JSON adds indentation and line breaks to make it readable by humans. Minified JSON removes all whitespace to reduce file size — useful for transmitting data over a network. Both are functionally identical and parse to the same data.
Is my JSON sent to a server?
No. All validation and formatting uses the browser's built-in JSON.parse() and JSON.stringify() — your data never leaves your device.
Does JSON support comments?
No — standard JSON does not support comments. If you paste JSON containing // or /* */ comments this tool will report it as invalid. Consider JSON5 or JSONC for comment-supporting variants, but note these won't be accepted by standard JSON parsers.