JSON formatter and validator
Check JSON syntax, add indentation or remove unnecessary whitespace without rounding numbers.
Enter data
Paste one JSON document and choose indentation, minification or validation only. Fields marked with an asterisk are required.
About this tool
Readable JSON makes API responses and configuration files easier to inspect. One form combines validation, two- or four-space indentation and minification. Number tokens are never converted to JavaScript numbers, so long identifiers and exponent spelling remain exactly as entered. Object member order and string escape spelling are preserved.
How to use the calculator
- Paste a single JSON value without comments or trailing commas.
- Choose a mode and select “Process”. If an error appears, inspect its line and column.
- Copy the output to your editor. Check it in the destination application before use.
Calculation details
Formula and calculation method
The parser checks JSON grammar and builds a bounded token tree. Formatting changes only whitespace outside string literals; minification removes it. Number and string spellings are preserved.
Worked example
Input { "id": 9007199254740993, "ok": true } minifies to {"id":9007199254740993,"ok":true}. The identifier is not rounded to 9007199254740992. A document with two “id” members is rejected.
Limitations
- Up to 50,000 UTF-16 units per field, 64 container levels and 10,000 values per document. Duplicate member names and unpaired Unicode surrogates, including escaped ones, are rejected. This is a deliberately narrower interoperability profile, not proof of compatibility with every parser.
- No JSON5, comments, JSON Lines, JSON Schema, syntax repair or file import. Valid syntax does not establish business-data validity. This is not JSON canonicalization.
- Text output is limited to 500,000 UTF-16 units. In comparisons, combined report-path lengths cannot exceed 100,000 units; exceeding a limit gives an error, not a partial result.
Sources
Engine version: 1.0.0 · Last reviewed: 1 October 2026
Frequently asked questions
Can large numbers change?
Not during formatting. The number token, including exponents and fractional zeros, is retained. The destination application may still use a limited numeric type and lose precision.
Why is a duplicate member rejected?
Applications interpret duplicate names differently. We reject them, including names written using different escapes, to avoid silently discarding data.
Does validation check a schema?
No. It checks syntax and the documented limits only. Required fields, business types and value ranges need separate validation.
Does data leave the browser?
Inputs and results are not sent to a server or analytics or stored in the URL or persistent form storage. Loading the page requires a hosting request. Clipboard copies, printing and browser extensions remain outside reset control. Avoid secrets.