How to open, read, validate, and use .json data in modern web apps and APIs.
{
"format": "JSON",
"extension": ".json",
"standsFor": "JavaScript Object Notation",
"humanReadable": true,
"languageIndependent": true,
"universal": true
}Created by Douglas Crockford in the early 2000s as a simpler, lighter alternative to XML for transmitting data between web servers and browsers.
JSON is completely language-independent. It is parsed and generated natively by Python, Ruby, Java, PHP, Go, Rust, Swift, and C#.
Data is organized like real-world entities: named properties mapped to specific values.
{"name": "Alice", "age": 34}
{
"name": "Alice Johnson",
"age": 34,
"email": "alice@example.com",
"isPremium": true,
"skills": [
"JavaScript",
"Python",
"CSS"
],
"address": {
"city": "New York",
"country": "US"
}
}Wrap an object — an unordered collection of key/value pairs.
Keys are always wrapped in double quotes, separated by a colon.
Wrap an array — an ordered list of multiple items.
Strings "text", Numbers 34, Booleans true/false, null, Arrays [], and Objects {}.
Transmitting live data across web services (weather forecasts, payment gateways, social feeds).
Editor settings, VS Code configurations, and developer project manifests like package.json.
Native format for NoSQL document stores such as MongoDB, Firebase Firestore, and CouchDB.
Internationalization string catalogs (i18n) and cached browser session storage.
Right-click and open with Notepad or TextEdit. 100% safe because JSON contains no executable code.
Syntax color coding, tree collapse, auto-formatting, and instant red squiggles on syntax errors.
Paste into jsonlint.com to validate formatting and pinpoint exactly which line or bracket is broken.
Drag-and-drop into Chrome, Firefox, or Edge. Modern browsers format and nest JSON automatically.
| Aspect | JSON (Modern Standard) | XML (Legacy / Documents) |
|---|---|---|
| Readability | High — clean and concise syntax | Verbose — repetitive tags |
| Payload Size | Smaller — minimal transmission overhead | Larger — tag repetition bloat |
| Parsing Speed | Fast & native in all languages | Heavier DOM tree parsing required |
| Comments | Not supported (pure data only) | Supported (<!-- -->) |
| Primary Usage | REST APIs, configs, mobile apps | Legacy enterprise & document formats |
Commas after the last element break parsers instantly.
JSON strictly demands double quotes for all strings & keys.
Unlike plain JS objects, JSON keys must always be strings.