JSON Formatter & Validator
Free JSON formatter and validator: beautify JSON with 2 or 4 spaces or tabs, minify it, and get exact line/column for syntax errors. Private, runs in your browser.
🔒 Private: runs in your browser, no upload
How to format JSON
- Paste JSON in the left box or upload a .json file.
- Choose 2 spaces, 4 spaces, tab or minify — the result updates instantly.
- If the JSON is invalid, the error shows the exact line and column.
Frequently asked questions
Is my JSON sent to a server?
No. Formatting and validation use your browser's built-in JSON parser, so sensitive data such as API responses never leave your device.
What does minify do?
It removes all unnecessary whitespace and line breaks, producing the smallest valid JSON — useful for configs, APIs and storage.
Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments. The error message points to the exact position.
Is there a size limit?
No fixed limit; files of several megabytes format instantly on modern devices.