Start with the first parser error
JSON parsers often stop at the first place where the document can no longer be interpreted. The reported character is not always where the mistake began, but it is the best starting point. Inspect the current line and the line immediately before it—especially the final property, comma, quote, or bracket.
The most common JSON syntax errors
{
"name": "Megaish",
"apps": 33
}- Property names or string values using single quotes instead of double quotes.
- A missing comma between properties or array items.
- A trailing comma after the final item.
- An opening brace or bracket without its closing partner.
- An unescaped double quote, backslash, newline, or control character inside a string.
- Comments,
undefined, orNaN, which JavaScript may recognize but JSON does not.
Validate, format, and narrow the problem
- Work on a copy when the JSON contains important configuration.
- Paste or open the document in a JSON validator.
- Go to the first reported line and column.
- Fix one error, then validate again.
- Format the valid result so nesting is visible.
- Compare the keys and value types with the API or configuration schema you expect.
JSON Viewer & Formatter supports formatting, validation, minification, and conversion workflows in a lightweight Windows app. For structural understanding after syntax is valid, use the separate JSON diagram workflow.
Syntax validity is not data correctness
A document can be valid JSON and still be wrong for the receiving system. A numeric ID may have been supplied as a string, a required property may be absent, or a date may use an unexpected format. Validation answers “can this be parsed?” Schema or application validation answers “does this data have the required shape and meaning?”
Protect sensitive data
API responses and configuration files can contain access tokens, email addresses, internal hostnames, or customer data. Remove secrets before sharing a snippet in a ticket or public validator. For sensitive local files, use a workflow approved by your organization.
Explore JSON Viewer & Formatter for Windows
This guide answers the workflow first. Review the verified features and screenshots on the Megaish product page before continuing to the Microsoft Store.
View features and screenshotsCommon questions
Why is valid JavaScript not always valid JSON?
JavaScript object syntax permits constructs that JSON does not, including comments, undefined values, and—in some contexts—single-quoted strings.
Should JSON have a trailing comma?
No. Standard JSON does not allow a comma after the final object property or array item.
What does unexpected token mean?
The parser encountered a character that does not fit the expected JSON grammar. Check that location and the delimiter immediately before it.