π JSON Formatter & Validator
Paste JSON to instantly format, validate, or minify it. Errors are highlighted with line numbers. Everything runs in your browser.
FAQ
Is my JSON data sent to a server?
No. JSON parsing and formatting uses the browser's built-in JSON.parse() and JSON.stringify(). Your data is processed entirely on your device and never transmitted anywhere.
Why is my JSON invalid?
The most common issues are: trailing commas after the last item (not allowed in standard JSON), single quotes instead of double quotes for strings, unquoted property keys, JavaScript comments (// or /* */), or values like undefined, NaN, or Infinity which are not valid JSON.
What indent size should I use?
2 spaces is the most common convention and is used by npm, Prettier defaults, and most JavaScript ecosystems. 4 spaces is common in Python and some style guides. Tabs are useful when you need configurable visual width per developer preference.
Can this handle large JSON files?
Yes, up to the limits of your browser's available memory. For very large files (tens of MB), consider using a dedicated tool. Pasting JSON directly is fine for typical API responses and config files.
What is the difference between Format and Minify?
Format adds indentation and newlines to make JSON human-readable. Minify removes all unnecessary whitespace to produce the smallest possible valid JSON β useful for API responses and storage.