Fix syntax errors, choose readable or compact output and inspect important values.
Understand the settings
JSON is a data format with strict syntax. Object keys and strings use double quotes; comments, trailing commas, undefined and JavaScript expressions are not valid JSON. Formatting changes layout, not the intended data values.
Readable formatting adds indentation and line breaks. Compact formatting removes unnecessary whitespace outside strings. Whitespace inside a quoted string is data and must remain. The formatter preserves number spellings, including large integers, instead of round-tripping every numeric value through JavaScript floating-point numbers.
Syntax validation is not schema validation. A JSON document can be valid while missing a required field or containing a value your application does not accept. Duplicate object keys are also a portability concern because downstream parsers can disagree about which value wins; avoid them.
Step by step
- Paste JSON or load the on-page example.
- Choose formatted or compact output.
- If validation fails, inspect the reported location and nearby punctuation.
- Copy/download the result, then validate it against the receiving application’s requirements.
Fix a trailing comma
The text {"name":"Avery",} is invalid JSON because of the comma before }. Remove that comma to get {"name":"Avery"}. Do not remove commas between legitimate fields.
Limits and what to check
- Input limit: 1,000,000 characters and a nesting limit of 128.
- No execution, automatic schema inference or repair of ambiguous malformed data.
- Formatting does not remove secrets; inspect tokens and personal data before sharing.
- Input and result remain in the browser.
Troubleshooting
Single quotes fail
Single-quoted strings are permitted in JavaScript but not JSON. Use double quotes and escape embedded double quotes.
Valid JSON fails in my app
Check its schema, field names, required values and data types. Syntactic validity is only the first step.
A secret is still present after minifying
Minifying reduces whitespace; it is not redaction or encryption.
Related tools
- Convert CSV and JSON while keeping your data understandable · Guide
- Understand text, Unicode and byte encodings · Guide
- Clean text while knowing exactly what changed · Guide
Updated October 9, 2026. Report an issue with this guide.