The most common question is why JSON that looks fine still fails to parse. A handful of syntax rules trip up almost everyone at some point - see the FAQ below for the exact causes and how JSON's rules differ from a plain JavaScript object.
Why is my JSON showing as invalid when it looks correct?
The most common causes are: a trailing comma after the last item in an array or object (valid in JavaScript but not in JSON), single quotes instead of double quotes around strings, an unquoted key name, or a comment inside the JSON (JSON doesn't support comments - not even // or /* */). The formatter flags the JSON as invalid the moment any of these appear, so if formatting fails, check these four causes first.
What is the difference between JSON and a JavaScript object?
JSON is a text format derived from JavaScript syntax, but it has stricter rules. All keys must be double-quoted strings. Values cannot be undefined, functions, or NaN. Trailing commas are not allowed. A JavaScript object literal is more permissive - but when you serialize it with JSON.stringify(), the output must be valid JSON.
How do I format a minified or compressed JSON string?
Paste the minified JSON into the input field and click Format, or turn on Auto Format to beautify it the moment you paste. The formatter applies consistent indentation (2 or 4 spaces, your choice) and line breaks so nested objects and arrays are readable. This is useful for inspecting API responses, compressed config files, or database query results.
What does minify JSON do?
Minifying removes all whitespace, newlines, and indentation from a JSON string. The result is the smallest possible representation of the same data - useful for storing in a database, sending over a network, or comparing against another payload byte-for-byte.
Is it safe to paste API keys or private data into this formatter?
The formatting and validation happen entirely in your browser using the standard JSON.parse and JSON.stringify functions - nothing is uploaded to a server. You can confirm this yourself: open your browser's DevTools Network tab before pasting, and you'll see no outgoing requests fire when you format or validate JSON on this page.
What does formatting actually change in my JSON?
Only whitespace - the data itself is untouched. For example, {"name":"Aisha","active":true,"tags":["admin","dev"]} becomes the same object spread across multiple lines with your chosen indentation (2 or 4 spaces), making the nesting visible at a glance. Minify does the reverse: it strips the formatting back down to that single compact line.
Does this formatter support JSON5 or JSONC (JSON with comments)?
No. This tool parses with the browser's native JSON.parse, which only accepts standard JSON as defined in RFC 8259 - no comments, no trailing commas, and no unquoted keys. Config files like tsconfig.json often use JSONC and will show as invalid here until comments and trailing commas are removed.
Is there a limit on how large a JSON file I can format?
There's no hard-coded size limit in the tool itself. Parsing and formatting both happen in your browser's memory, so in practice the ceiling is your device's available memory rather than a fixed number - typical API responses and config files up to several megabytes format instantly.