JSON file format: what it is and how to use it
JSON is the web's data language: human-readable objects and arrays that every programming language parses natively. Learn when to use it and what to choose instead.
-
No uploadsFiles stay on your device
-
Batch processingHandle multiple files at once
-
100% privateNo sign-up, no tracking
What is a JSON file?
A .json file holds data in JavaScript Object Notation, a strict little grammar of objects {}, arrays [], strings, numbers, booleans and null that maps almost one-to-one onto every language's native data structures. Born as JavaScript's literal syntax and standardized as ECMA-404/RFC 8259, it displaced XML as the default of APIs, configs and data exchange. Its strictness is deliberate: no comments, no trailing commas.
When should you use JSON?
- APIs and data interchange: the default request/response payload of the web.
- Config and state files: package.json, tsconfig, app settings, machines and humans both read it.
- Structured storage: nested, typed data that CSV cannot express.
When is another format a better fit?
For hand-maintained configs, YAML or TOML allow comments and breathe easier. For tabular exports CSV beats it; for document markup XML has schemas and mixed content JSON lacks. And for huge datasets, binary formats (Parquet, MessagePack) parse much faster.
The short version: JSON is data's common tongue: strict, universal and everywhere. Pick YAML when humans write it daily.
How to open a JSON file
On Windows
Double-click the file, or open it with Any text editor.
On macOS
VS Code opens JSON files on macOS.
In your browser
Open JSON files right in a browser tab or with the dexrr viewer. No install, no upload.
Also opens in
-
Any text editor
-
VS Code
-
jq
-
Any web browser
View or convert JSON files
A quick preview or a new format. No install, no upload.
JSON technical details
- Full name
- JavaScript Object Notation
- Extensions
- .json
- MIME type
-
application/json - Compression
- None (uncompressed)
- Developer
- Douglas Crockford (RFC 8259)
- Specification
- www.json.org
JSON questions, answered
How do I open a .json file?
Any text editor, IDE or browser opens it; jq and dev tools make it navigable. dexrr displays and converts json files directly in your browser.
Can I convert JSON files online?
Yes, dexrr converts json locally in your browser: JSON to YAML, JSON to CSV for tables or JSON to XML for legacy systems.
Is JSON better than XML?
For data interchange, mostly. It is lighter, maps to native types, and parses instantly. XML still wins where schemas, namespaces and mixed-content documents matter.
Why won't my .json parse?
Almost always a syntax slip: a trailing comma, single quotes, unquoted keys or a stray comment. JSON is deliberately strict. A validator pinpoints the line instantly.
Can JSON files have comments?
Standard JSON cannot, that is intentional. JSONC/JSON5 supersets add them for config files, but .json served as data must stay strict.
Is the JSON format outdated?
No, it is the entrenched lingua franca of APIs and structured data, standardized and stable by design.