JSON Formatter & Validator
Format, validate, and minify JSON directly in your browser.
Your input is not sent to a server. All processing is performed locally in your browser.
Actions
Format and validate JSON
Validate JSON syntax locally in your browser, then create either a readable indented version or a compact version without insignificant whitespace.
When this tool is useful
Use this tool to inspect API responses or configuration files, and to locate JSON syntax errors. Minify parses and rewrites JSON, so unusually large integers or duplicate object keys may not be preserved exactly.
How to use
- Enter or paste JSON.
- For formatting, choose 2 spaces, 4 spaces, or a tab for indentation.
- Choose Format or Minify.
- If a syntax error appears, check and correct the indicated area.
- Copy the current result.
Processing
JSON.parse validates the syntax and JSON.stringify formats or minifies the result. Your input is not sent to a server.
FAQ
What happens when the JSON is invalid?
No result is generated. When available, the tool shows the line and column near the syntax error.
Can I minify JSON?
Yes. Minify parses the JSON and writes a compact representation. The original text and certain numeric representations may not be preserved exactly.
Can I change the indentation?
Yes. Choose 2 spaces, 4 spaces, or a tab.
Is my input sent to a server?
No. Validation, formatting, and minification all take place locally in your browser.