data TOOL / NO ACCOUNT NEEDED

JSON Formatter

Indent valid JSON for reading, or minify it without rounding large numbers.

JSON WORKBENCHProcessed locally · 2 MB limit

Whitespace changes stay outside strings. Large number tokens and key order are preserved. Validation checks syntax, not an application schema.

Format for readability, minify for compact transfer, or validate syntax. The original input remains available so you can review each change.

Syntax is different from meaning

Valid JSON uses double-quoted property names and strings. It does not allow comments, trailing commas, undefined, NaN, or Infinity. A syntax validator can identify these problems but cannot decide whether an email address or price is appropriate.

This tool checks JSON syntax, not a JSON Schema. It also reports duplicate object keys, because different readers may handle them differently.

Formatting without changing numbers

A parser can round integers beyond JavaScript’s safe integer range if it converts them into Number values. This formatter validates tokens and rewrites only whitespace outside strings, preserving the original number spelling and key order.

Minification removes unnecessary whitespace outside strings. Spaces within a string value remain part of your data.

Fix errors carefully

Start at the reported line and column and inspect the preceding token as well. A missing comma may only become apparent when the next property starts. Do not blindly replace every single quote: apostrophes inside strings may be real content.

Choose Format, Minify, or Validate

Format adds two- or four-space indentation. Minify removes whitespace outside strings. Validate checks grammar and duplicate keys without modifying the original input. Copy and download use the most recent successful result.

A missing comma or trailing comma produces a line and column, with a Go to error action. It never displays a JavaScript stack trace. Editing the input clears the old result. Clear also cancels background processing and resets indentation.

Processing runs in a local worker so a large document does not block the controls. Inputs are limited to 2 MB, nesting to 200 levels, and expanded output to 10 MB. If indentation would expand too far, choose Minify or simplify the document.

{"id":9007199254740993,"label":"keep these spaces"}

Frequently asked questions

Does it repair JSON automatically?

No. It points out syntax errors so you can decide what the intended data should be.

Does it validate a schema?

No. It checks JSON grammar and warns about duplicate object keys.

Are large integers preserved?

Yes. Formatting retains original numeric tokens rather than serializing parsed JavaScript numbers.

Can I paste credentials?

Processing is local, but use synthetic examples when possible and be mindful of shared devices and clipboard history.