Simple JSON Editor Online
{
"query": {
"count": 10,
"created": "2011-06-21T08:10:46Z",
"lang": "en-US",
"results": {
"photo": [
{
"farm": "6",
"id": "5855620975",
"isfamily": "0",
"isfriend": "0",
"ispublic": "1",
"owner": "32021554@N04",
"secret": "f1f5e8515d",
"server": "5110",
"title": "7087 bandit cat"
},
{
"farm": "4",
"id": "5856170534",
"isfamily": "0",
"isfriend": "0",
"ispublic": "1",
"owner": "32021554@N04",
"secret": "ff1efb2a6f",
"server": "3217",
"title": "6975 rusty cat"
},
{
"farm": "6",
"id": "5856172972",
"isfamily": "0",
"isfriend": "0",
"ispublic": "1",
"owner": "51249875@N03",
"secret": "6c6887347c",
"server": "5192",
"title": "watermarked-cats"
}
]
}
}
}
About This JSON Editor
JSON is a data interchange format, not a programming language. Its whole value is that the grammar is tiny and every platform implements it identically - which also means it is unforgiving: one trailing comma and the entire document fails to parse.
The editor matches brackets and braces and highlights keys, strings and numbers, which is usually enough to find a structural error by eye.
The complete JSON grammar
| Syntax | What it does |
|---|---|
{ "key": "value" } |
Object. Keys must be double-quoted strings. |
[1, 2, 3] |
Array. Mixed types are legal. |
"text" |
String. Double quotes only - single quotes are not JSON. |
42, -3.14, 1.2e5 |
Number. No leading +, no hex, no NaN, no Infinity. |
true, false, null |
The three literals. Lowercase, always. |
"line\nbreak" |
Escapes: \" \\ \/ \b \f \n \r \t and \uXXXX. |
Why your JSON will not parse
- Trailing commas. Legal in JavaScript, illegal in JSON. This is the single most common parse error.
- Comments. JSON has none. If your config file has // comments it is JSON5 or JSONC, not JSON.
- Single quotes.
{'a': 1}is a JavaScript object literal, not JSON. - Unquoted keys. Also valid JavaScript, also not JSON.
- Large integers. JSON numbers have no size limit, but JavaScript parses them as doubles, so anything above 2^53 loses precision. Serialise IDs as strings.
- Duplicate keys. The specification does not define the behaviour; most parsers keep the last one silently.
Your Code Never Leaves Your Browser
The editor is JavaScript running in this tab. Nothing you type is posted to a server, stored, logged or associated with you, and there is no account and no autosave. That makes it safe to paste a snippet from a private codebase in order to read it with highlighting. The trade-off is that nothing persists either — refresh the page and your content is gone, so copy anything you want to keep.
Frequently Asked Questions
Does this editor validate JSON?
It highlights syntax and matches brackets, which reveals most structural mistakes immediately, but it does not run a strict parser. For a definitive check, parse the document with a real JSON parser.
Can JSON have comments?
No. The format deliberately omits them. If you need annotated configuration, use YAML, TOML, or a superset such as JSON5 - and be aware that a standard JSON parser will reject those files.
What is the difference between JSON and a JavaScript object?
JSON is a text format with a strict grammar; a JavaScript object is an in-memory structure with far looser syntax. Every valid JSON document is valid JavaScript, but the reverse is not true.
Editors for Other Languages
Same editor, configured for a different language, each with its own syntax reference.