JSON formatter
Format, validate, and make sense of your JSON.
Result
Start typing and the result appears here. No button needed.
JSON formatter, without the extra steps.
Validate JSON syntax and format valid input using two-space indentation, or minify it to a single line for a config value or a URL parameter. Validation runs as you type, and parse errors are shown without replacing your input so you can correct them and try again.
How to use this tool
- 1Paste a JSON value.
- 2Choose formatted or minified output.
- 3Copy the result, or fix the syntax error it reports as you type.
When JSON formatter is the right tool
- An API returned minified JSON that is unreadable as one line.
- A config file will not load and you need to find the syntax error.
- A webhook payload needs inspecting before it is handled.
- A response contains data you should not paste into an online formatter.
Strict parsing is the point
Parsing uses the browser's native JSON parser, which accepts only standard JSON. Trailing commas, comments, single-quoted keys, and unquoted identifiers are rejected even though many editors and config loaders tolerate them. That strictness is useful as a check: if it does not parse here, it will not parse in most consumers either, and the error position points at the problem.
What formatting changes
Formatting re-serialises the parsed structure, so whitespace and indentation change while the data does not. Object key order is preserved as written. Numbers are re-emitted from their parsed values, which means very large integers beyond the safe integer range can lose precision — a real consideration for IDs from systems that use 64-bit numbers, which are safer transported as strings.
A few quick answers.
Paste a JSON value. Choose formatted or minified output. Copy the result, or fix the syntax error it reports as you type.
Tool inputs are processed in your browser. Crate has no upload endpoint and no accounts. Downloaded site assets and a cookie-free page-view count still require a connection; your files and text are not included in those requests.
Standard JSON only: comments and trailing commas are rejected. Duplicate object keys resolve to the last value. Large numeric literals may lose precision through JavaScript number parsing.
Parsing is strict standard JSON: trailing commas, comments, and single-quoted keys are invalid even though many editors tolerate them.
Only whitespace changes. One caveat: very large integers beyond the safe range can lose precision, which is why large IDs are safer as strings.