JSON requires precise syntax
Property names and strings need double quotes. Comments, trailing commas, undefined and single-quoted strings are not allowed.
A valid example is {"name":"Kitavio","local":true}. Formatting adds indentation and line breaks; minification removes formatting without removing spaces inside a string.
Read a validation error
On failure, inspect the reported position, line or column when available. A missing comma can cause an error at the following element.
Formatting does not automatically repair an invalid document. Correct the input and validate again.
- Paste JSON without Markdown wrappers.
- Choose 2 or 4 spaces for formatting.
- Validate and inspect the output structure.
- Minify only after confirming the data is correct.
Precision and duplicate keys
The browser’s JSON.parse and JSON.stringify are used. Integers beyond JavaScript precision may change, and the last duplicate key is retained.
To preserve very large numbers, store them as strings or use a specialized workflow. The tool is local; formatting does not encrypt or anonymize data.
Criteria for reviewing and delivering the result
Prepare a sample reflecting the application structure: an object with fields, an array and several value types. Review syntax before changing content to resolve an error. Comments, single quotes and trailing commas may belong to another representation, but not the standard JSON accepted here. If validation succeeds while an API rejects the sample, compare fields and types against the receiving contract. Parsing and application acceptance are separate checks.
Formatting and minifying use analysis and serialization, so do not expect every input byte to survive. Repeated keys and integers beyond ordinary numeric precision need particular attention. Keep the source for signatures, large identifier examples or exact representations. Compare element count, strings with spaces and important values before and after processing. Readable output aids inspection; compact output suits some technical fields. Neither certifies business correctness. Replace credentials and real data with fictitious values before using examples in public documentation. A small representative test is useful for confirming the intended structure while preserving the original dataset for resolving discrepancies that a formatted preview alone cannot explain.
Review a response before sharing it
Paste {"ok":true,"n":2} and use two-space indentation. Then open contacts.json in a text editor and paste its contents to try a list of several objects.
The object is validated and displayed with one property per line. Values are not translated or converted to the interface language.
A trailing comma or unquoted key produces an error. Formatting does not determine whether a field is valid for a destination API: that depends on its schema.
View tool screenshot
