2026-08-07
What is JSON? A practical guide for developers
Learn what JSON is, how it differs from JavaScript objects, and when to use it in APIs and config - then format JSON privately in your browser.
JSON (JavaScript Object Notation) is a lightweight text format for storing and exchanging structured data. APIs return JSON, config files ship as JSON, and many tools log events as JSON lines. If you work on the web, you will read and write JSON constantly.
What JSON looks like
JSON represents objects, arrays, strings, numbers, booleans, and null. Objects use curly braces and key/value pairs; arrays use square brackets. Keys and strings must use double quotes:
{
"product": "Jigglify",
"features": ["fast", "private", "free"],
"active": true,
"version": 1
}JSON vs JavaScript object literals
JSON grew out of JavaScript, but it is stricter. JavaScript often allows unquoted keys, single-quoted strings, trailing commas, and comments. Those patterns are not valid JSON. When an API rejects a payload, the cause is frequently a JavaScript-style literal pasted where strict JSON is required.
When developers use JSON
- REST and GraphQL-style API request and response bodies
- App configuration (package manifests, feature flags, theme tokens)
- Inter-service messaging and event payloads
- Exporting and importing structured data between tools
Why formatting and validation matter
Minified JSON is hard to skim. Invalid JSON fails silently until runtime. A local formatter and validator lets you pretty-print payloads, catch trailing commas, and inspect structure without uploading secrets to a third-party site.
Ready to inspect a payload? Format, minify, or validate JSON in your browser - nothing is uploaded.
Open the free JSON tool →
Next reads: How to format JSON online · Common JSON errors