JSON formatter / minifier

Validate JSON and format it with indentation or remove unnecessary whitespace.

Text Stateless

Maximum text length: 65,536 Unicode code points.

How it works and examples

Pretty mode uses two-space indentation. Numeric tokens keep their exact digits and exponents; object order is preserved. Example: {"a":1} is expanded for reading. Duplicate keys, NaN, Infinity, comments, trailing commas and nesting beyond 32 levels are rejected. A scalar such as true is also valid JSON.