press ⌘K to switch tools
FORMAT & CONVERT
JSON Formatter / Validator
Format, validate, and minify JSON data instantly.
json-format
§01 ABOUT THIS TOOL
Overview
Paste any JSON and either pretty-print it with your chosen indentation or
collapse it to a single minified line. Every run is also a validation pass:
the input goes through JSON.parse, and the tool reports Valid JSON or
the exact parser error. Handy for inspecting API responses, tidying config
files, or shrinking payloads.
How to use
- Paste your JSON into the Input field.
- Pick an indent width from the Indent selector (
2,4, orTab). - Click Beautify to format or Minify to compress; the status badge shows
Valid JSONor the error. - Copy the result from the Output field.
Examples
{"hello":"world","n":[1,2,3]}+ Beautify (indent 2) → multi-line JSON with 2-space indentation- A formatted 40-line response + Minify → one compact line with all whitespace removed
{"a":1,}→ status shows a parse error (trailing commas are not valid JSON)
Notes
Numbers are re-serialized by JavaScript, so extremely large integers beyond
Number.MAX_SAFE_INTEGER (2^53 − 1) can lose precision. For 64-bit IDs, keep
them as strings.
FAQ
Is my JSON sent to a server?
No. Parsing, formatting, and minification run entirely in your browser via the native JSON.parse and JSON.stringify APIs. Nothing is uploaded or stored.
What happens if the input is invalid?
The tool shows the JavaScript parser's error message, such as "Unexpected token } in JSON at position 42", and leaves the output empty. The position hint usually points near the offending character.
Does formatting change my data?
The input is parsed and re-serialized, so only whitespace and key order behavior of JSON.stringify apply — values are untouched. Note that JSON does not allow comments or trailing commas, so those will fail validation rather than being stripped.