Data formats · Learning guide
What makes JSON valid?
JSON is a text format for structured data. Its simplicity comes from a deliberately limited grammar.
Use the supported types
JSON supports objects, arrays, strings, numbers, true, false and null. Object keys and strings require double quotes. Functions, undefined and comments are not part of JSON.
Watch punctuation
A comma separates members or elements, but a trailing comma is invalid. A missing quote can make an error appear later than the original mistake. Fix the earliest reported issue and try again.
Formatting is not validation of meaning
Parsing confirms syntax. It cannot tell whether a price should be positive, a field is required or an identifier exists. Those checks need a schema and application rules.
Keep secrets out of shared text
This tool works locally, but copied output can still expose credentials when pasted elsewhere. Inspect what you share.
Further reading: Reference source ↗. Written for this starter collection. Check primary references for specialised use.
Try the interactive tool