About the JSON Formatter & Validator
This formatter parses JSON in your browser and re-serializes it with the indentation you choose, catching syntax errors before they cause problems downstream. It's built for developers debugging API responses, config files or log payloads who need a fast, trustworthy check.
How to use it
- 01Paste or type JSON into the input panel.
- 02Pick an indent width, tab indentation, or minify.
- 03Optionally enable sort keys to normalize key order for diffing.
- 04Copy or download the formatted result.
Features
- Configurable indentation (2, 4, tab, or minified single line)
- Optional recursive key sorting for stable diffs
- Error messages that include the character position translated to line and column
- One-click copy and download as a .json file
Practical examples
Debugging an API response
Paste a minified API payload to instantly see its structure, then sort keys to compare two responses side by side.
Limitations
- Does not support JSON5 or JSONC (comments, trailing commas) — input must be strict JSON.
- Very large files (tens of megabytes) may be slow because parsing happens synchronously in the browser.
Privacy
All parsing and formatting happens locally in your browser. Nothing you paste is uploaded or stored.
Read the full privacy policy for how the site as a whole handles data.
Frequently asked questions
Does this validate JSON Schema?
No, it only checks that the text is syntactically valid JSON, not against a schema.
Can I format JSON with comments?
No, standard JSON does not allow comments; remove them first or use a JSONC-aware tool.
Why does sort keys change array order too?
Sort keys only reorders object keys; array element order is always preserved since arrays are ordered by definition.