JSON Formatter & Validator
Pretty-print, validate, and minify JSON with configurable indentation, detailed error positions, and document statistics. Runs entirely in your browser.
Input JSON
How it works
- Paste JSON, choose an indentation, and click Format — the document is parsed and re-serialized with clean indentation.
- Minify strips all whitespace to produce the smallest valid representation.
- If the document is invalid, the error shows the exact message plus line and column, so you can jump straight to the problem.
- Statistics (nodes, keys, depth, bytes) update automatically after every run.
About JSON Formatter & Validator
Pretty-printing turns a wall of JSON into an indented, readable tree, which makes nested structures and subtle mistakes — a missing comma, a trailing comma, a stray quote — far easier to spot. Formatting never changes the meaning of the document: it only re-serializes the parsed value, so the output is guaranteed to be valid JSON.
Use this tool before sharing JSON in code review, pasting payloads into documentation, or debugging API responses. Minify when you need the smallest payload for a URL query, a storage cell, or a log line. Since parsing happens on your device, even sensitive configuration or private API responses can be formatted without ever leaving your browser.