Format, validate, and minify JSON data and download.
Format, validate, and minify JSON data and download.
Ctrl/Cmd + Enter to format and Ctrl/Cmd + K to clear.No. All formatting and validation happens in your browser using JavaScript's native JSON methods. Your data never leaves your device — you can verify this by opening your browser's Developer Tools → Network tab and checking that no requests fire when you paste JSON.
Formatting adds indentation and line breaks so JSON is easy to read. Minifying removes all whitespace so the JSON is smaller and faster to transfer. Both produce identical data — only the whitespace differs.
The most common causes are trailing commas, single quotes instead of double quotes, unquoted keys, comments, or the values undefined and NaN — none of which are valid JSON. Our validator will tell you exactly which line and column the error is on.
Yes. The formatter handles files up to several megabytes without trouble. For extremely large files (tens of megabytes), performance depends on your device — the actual parsing happens locally, so a modern browser will handle most everyday use cases comfortably.
Standard JSON does not support // or /* */ comments. Some tools use "JSONC" (JSON with Comments) or "JSON5" as extensions, but these are not standard and will be rejected by most parsers and APIs.
2 spaces is the most common convention in modern JavaScript and JSON files (used by npm, ESLint, and most style guides). 4 spaces is more common in Python and some legacy codebases. Tabs are used in Go projects and some editors. Pick whichever matches your project's existing style guide — consistency matters more than the exact number.