Step-by-step guides for fixing the most common JSON errors.
All guides
Base64 is reversible encoding, not encryption. Decode it in one step, handle Unicode correctly, and read JWT sections that use Base64url.
Read guide →Percent-encoding replaces unsafe characters with %XX so arbitrary text is safe in a URL. Know which characters to escape and how to decode them back.
Read guide →Since YAML 1.2 every JSON document is valid YAML. Convert YAML config to JSON, and watch for indentation and type-inference traps.
Read guide →A JSON array of objects maps to a CSV table — one row per object, columns from the union of keys. The real work is quoting and handling nested values.
Read guide →XML needs a single root and represents lists as repeated elements. Map @-prefixed keys to attributes and #text to element text for a reversible conversion.
Read guide →Stringifying JSON wraps it in quotes and escapes the inner quotes and special characters, producing a JSON string literal you can safely embed elsewhere.
Read guide →A trailing comma after the last object property or array item is valid in some JavaScript contexts, but it is not valid JSON.
Read guide →JSON strings and object keys must use double quotes. Single-quoted values are common in JavaScript snippets, Python-like output, and LLM responses.
Read guide →Object keys like name, active, and profile must be quoted in valid JSON, even when the key looks like a normal identifier.
Read guide →AI responses often look like JSON but include markdown fences, comments, Python-style literals, or JavaScript object syntax.
Read guide →This error usually means a parser reached an object key that is not valid JSON: an unquoted key, a comment, a trailing comma, or JavaScript syntax inside a strict JSON document.
Read guide →JSON looks like a JavaScript object literal, but it is a smaller data format with stricter syntax and no executable values.
Read guide →A quick validation pass before sending an API request can separate JSON syntax problems from authentication, schema, and backend errors.
Read guide →A formatter makes valid JSON easier to read. A repair tool tries to turn almost-JSON into valid JSON before formatting it.
Read guide →Unexpected token means a strict JSON parser reached a character that cannot appear at that position in valid JSON.
Read guide →Strict JSON can be converted to a JavaScript object with JSON.parse. JavaScript object literals need cleanup before they are valid JSON.
Read guide →