Paste JSON into the formatter, choose Check JSON to test its syntax, then Format JSON to make its structure readable. If it fails, check the punctuation before changing the data.
Written and reviewed by TestiFollow. Checked against the current tool on 20 November 2026.
Open JSON FormatterStart with the question you need to answer
- Is this valid JSON? Choose Check JSON in the JSON Formatter. It parses the input and reports whether its syntax is accepted.
- Can I read the structure more easily? Choose Format JSON for two-space indentation.
- Do I need a compact result? Choose Make compact to remove unnecessary formatting whitespace.
All three actions first parse the text. Formatting does not rescue invalid JSON: a missing comma still needs correcting. Keep the original before formatting important data.
What JSON is, with a valid example
JSON is a text format for exchanging structured data. An object uses {} and named properties; an array uses [] and ordered values. This small order record contains both:
{
"orderId": "US-1042",
"customer": {
"name": "Café Studio",
"emailUpdates": false
},
"items": [
{ "sku": "NOTEBOOK", "quantity": 2 },
{ "sku": "PEN", "quantity": 1 }
],
"deliveryNote": null
}
Names and text values use double quotes. Numbers, true, false and null do not. A colon separates a name from its value; commas separate properties or array elements. Nested objects and arrays follow the same rules. The last property or item has no trailing comma. These rules come from the JSON specification.
A JSON document can also be a single value, such as 42, true or "hello". It does not always need an outer object. An API may impose its own requirement for an object or particular fields.
Formatting, minifying and validation are different jobs
Pretty-printing adds layout so you can see nesting. Minifying removes unnecessary whitespace outside strings. For example, the following compact value can be formatted onto several lines without changing its ordinary values:
{"name":"Ava Lee","roles":["editor","reviewer"],"active":true}
The space inside "Ava Lee" belongs to the data and remains. Minification is not compression, encryption or anonymization.
Syntax validation checks whether text can be parsed. It does not establish that an email address exists, a price is correct or a required field is present. TestiFollow uses the browser's JSON.parse; it has no JSON Schema validator, API connection or business-rule checker. A successful check means Valid JSON, not “valid for every system.”
How to format JSON with TestiFollow
- Open the formatter and syntax checker. Paste or type JSON into Your JSON; there is no file-upload picker.
- Choose Check JSON if you only need a syntax check. Success displays Valid JSON. and leaves the result blank; copying and downloading are disabled for this action.
- Choose Format JSON for readable indentation, or Make compact for a compact result.
- Review Result, then use Copy result or Download JSON. The download is named
formatted.json, including when you chose compact output. - If clipboard access is unavailable, select and copy the result manually. Clear removes both input and result.
Editing the input clears the previous output so you do not accidentally copy a stale result. Input is limited to 500,000 JavaScript string units; most ordinary characters use one unit, while many emoji use two. An oversized paste is rejected rather than silently accepted by the tool's paste handler. Very deeply nested data may parse but fail when formatted.
Fix common JSON syntax errors
The tool reports a general quotes, commas and brackets error, not an exact line or column. Start with these short patterns. The first snippet under each heading is intentionally invalid.
Missing comma between properties
{"name":"Ava" "active":true}
Corrected:
{"name":"Ava","active":true}
Look just before the next property. Each property after the first needs a comma before it.
Trailing comma
{"tags":["red","blue",]}
Corrected:
{"tags":["red","blue"]}
The same restriction applies before an object's closing }.
Mismatched braces or brackets
{"items":[1,2}}
Corrected:
{"items":[1,2]}
Close the innermost structure first. Here the array needs ] before the surrounding object gets }.
Unquoted keys or the wrong quotes
These JavaScript-like values are not JSON:
{name:'Ava'}
{“name”:“Ava”}
Use straight double quotes around both the key and string value:
{"name":"Ava"}
Comments, undefined, NaN and literal Infinity are not JSON values either. Do not delete comments from a configuration file blindly: its intended format might be JSONC or another format rather than strict JSON. More error patterns are documented in MDN's JSON parsing reference.
Escape quotes, backslashes and newlines inside strings
A quote inside a string needs \"; a literal backslash needs \\. Represent a line break within a string as \n, rather than inserting a raw newline between its quotes. This complete example is valid JSON:
{
"message": "She said \"Hi\".\nNext line",
"path": "C:\\reports\\2026"
}
The parsed message contains a real line break; the JSON text represents it with an escape. Indentation outside a string is different from whitespace inside it. Accented names and emoji can appear directly in a JSON string; JSON does not require turning every non-ASCII character into an escape.
Troubleshoot without changing the meaning
- Check that you copied the complete value, without a log timestamp, HTTP headers, Markdown fences or a JavaScript variable assignment.
- Check quotes, separators and closing symbols. Fix one clear problem, then run the check again.
- If the value is large, reproduce the failure with a smaller copy while retaining balanced objects and arrays. Keep the untouched original.
- Once syntax passes, verify required fields, types and allowed values against the receiving system's documentation or schema.
If the source is Base64-encoded JSON, decode the text first, then format it. The Unicode and Base64 guide explains when that works and why decoding arbitrary binary data is a different task.
Important limits: repeated keys and large numbers
TestiFollow is a parser-and-serializer workflow, not a byte-preserving editor. Repeated names are not flagged: {"id":1,"id":2} becomes {"id":2} when formatted or minified. Use unique names rather than treating a successful syntax check as duplicate-key detection.
JavaScript number precision also matters. For example, formatting {"id":9007199254740993} produces {"id":9007199254740992} with spacing added. Keep identifiers as strings when your data contract permits; use tooling that preserves numeric precision when exact large numbers are required. Syntax checking alone does not warn about this. See JSON.parse's precision limitations.
Formatting may normalize escapes, numeric spelling or property order. A very large exponent such as 1e400 parses to a non-finite JavaScript number and is serialized as null. Do not reformat a signed payload or overwrite an exact source without reviewing the result. These are consequences of parsing and JSON.stringify, rather than a promise that only spaces change.
Privacy and frequently asked questions
Is my JSON uploaded?
No. The current tool parses and formats it in your browser without sending the input to TestiFollow. Normal page and asset requests still happen, and optional first-party counts record coarse actions rather than JSON content. The page clears its fields on leaving; that is not a secure-erasure guarantee for your clipboard or browser. See the privacy notice.
Can it fix invalid JSON automatically?
No. It reports failure and clears the result. Use the examples above to fix syntax deliberately; automatic repairs can guess the wrong meaning.
Why does my API reject JSON after the checker says it is valid?
The API may require a different shape, field type or value. Syntax is only the first check. Review the API's response and contract rather than adding formatting whitespace.
Can I paste several JSON objects one after another?
Not as one standard JSON document. The tool expects a single value. JSON Lines is a different workflow; check records separately or use an array only if that matches your intended data format.
For other local writing and developer tasks, browse Text & Developer tools.