⭐ 0

Invalid JSON Example: Unquoted Object Key

Check JSON structure and configurations for errors offline in the browser.

🔒 Processed entirely in your browser — nothing you enter here is ever uploaded.

The result appears on this page after you run the tool. Nothing you enter is uploaded.

Processing... 0%
Scanning character structure
Locating brace alignment
Validating data nodes
Mapping syntax errors
Formatting report

Result

About this tool

This page opens the JSON validator preloaded with a two-property object where the first key, status, was typed without the double quotes JSON requires, while the second key, "code", is correctly quoted. The validator runs the instant the page loads, so the failure shown below is a live, real parse of this exact text.

Unquoted keys are valid in plain JavaScript object literals, which is exactly why this mistake is so common: it's easy to write JSON by hand the way you'd write a JS object and forget that the JSON specification, unlike JavaScript, requires every key to be a double-quoted string with no exceptions — not single quotes, not bare identifiers.

The error message and position below point to exactly where the parser encountered the unexpected bare word instead of an opening quote. The fix is simply to wrap the key in double quotes, the same way "code" already is in this example — compare against valid-api-response-json to see every key correctly quoted.

Example. The text {"a":1,"a":2} is flagged for a duplicate key even though JSON.parse would keep the last value.

Limit. A trailing comma is a syntax error, and comments are not allowed.