On this page
Validate JSON when you need to check its syntax; format it when you want indentation for reading or editing; minify it when you need a compact representation. The tool checks syntax before formatting or minifying. If the input is invalid, neither action repairs it.
| Your goal | Choose | What you get | Keep in mind |
|---|---|---|---|
| Check whether the syntax is valid | Validate | A status or diagnostic, without a new document | This does not check your application’s data rules. |
| Read or edit the structure | Format | JSON with line breaks and indentation | Output is generated only when the input can be parsed. |
| Get compact text | Minify | Serialized JSON without presentation whitespace | This does not create a compressed file. |
Try your chosen action in the JSON formatter and validator. Keep the original if you plan to copy a transformed result.
One document, three different results
Use this same valid input for all three actions:
{"product":"Notebook", "active":true, "tags":["paper","blue"]}
Validate reports Valid JSON. Validation creates no new document; it only confirms that the text can be parsed as JSON.
Format with two spaces of indentation produces a version whose structure is easier to read:
{
"product": "Notebook",
"active": true,
"tags": [
"paper",
"blue"
]
}
Minify produces compact text on one line:
{"product":"Notebook","active":true,"tags":["paper","blue"]}
In this example, both transformations represent the same parsed fields and values; their presentation changes. The JSON specification permits presentation whitespace between syntax elements. Removing it does not create a ZIP file or guarantee better network performance.
When the input is invalid
{"product":} has no value after the colon. Validation reports a syntax problem. Formatting and minifying cannot produce JSON output from it either: correct the input, then check it again. For help finding the cause, see how to fix JSON syntax errors.
Before using the result
Formatting and minifying parse and serialize the document again. They do not promise to preserve the original bytes: the tool warns about duplicate keys, where the last value takes effect, and large integers that can lose precision. If your data includes these cases, review the warning and compare the result with the original before using it.
All three actions address syntax. They do not check required fields, types specified by a JSON Schema, or business rules. To check a contract after syntax, follow the JSON syntax vs. JSON Schema walkthrough: it shows how to locate a type mismatch and decide what to change.