Paste your document into JSON Workpad and select Validate. An error includes its line and column, a highlighted excerpt and a suggested correction. Use Jump to error to select the location. Fix the first issue and validate again: a later error may only become visible after the first one is resolved.
Remove trailing commas
A comma separates two properties or array items. It cannot appear immediately before the closing brace or bracket. Remove only the final comma; keep the commas between earlier items.
JavaScript object literals can use single quotes or unquoted keys, but JSON cannot. Quote each key and string with double quotes. Do not blindly replace every apostrophe: an apostrophe inside a name such as O’Neil is part of the value.
The parser may point to the second key because that is where it discovers the missing separator. Inspect the text immediately before the reported location as well as the highlighted character.
A backslash starts an escape sequence in JSON. Write two backslashes to represent one literal backslash. For a line break inside a string, use the escape sequence \n instead of placing a raw line break between the quotes.
Boolean literals are lowercase true and false. JSON has no undefined, NaN or Infinity values. Use null only when it correctly represents your data, or remove the property if your application expects it to be absent. Null and a missing property are different.
Repeated names can produce different behavior across parsers. JSON Workpad rejects them during validation to avoid silently losing a value. In this example, keeping 4 is a deliberate choice, not an automatic repair. Its comparison tool instead uses the last occurrence and displays a warning.
Valid syntax does not guarantee that an API accepts the document. An API might require an integer instead of a string, a particular date format or a mandatory field. Check its schema and error response after syntax validation succeeds.
Keep identifiers precise. JSON Workpad preserves numeric text such as 9007199254740993 during formatting. Other software may round long numbers when it parses them; follow your API contract when choosing between a number and a string.
Compare the result before sending it
Use JSON comparison to inspect property and value changes. Object key order is ignored, while array order matters. To review punctuation, spacing or the original text exactly as entered, use text comparison.
Validation runs in your browser without sending your JSON to a server. The input limit is 1 MB and the nesting limit is 120 levels. The validator checks syntax and duplicate keys; it does not automatically repair or rewrite your input.