Format at a glance
- Full name
- JavaScript Object Notation
- File extensions
- .json
- MIME types
- application/json;charset=utf-8
- Category
- Text and data
- Compression
- Depends on the contained codec
- Transparency
- Not applicable
- Animation
- Not applicable
- Properties
Suitable tools
What is this format?
JSON means JavaScript Object Notation but is not limited to JavaScript. Keys require double quotes; comments and trailing commas are not part of the standard.
Unicode text and a defined grammar make JSON highly interoperable. Systems such as JSON Schema can add rules for content and data types.
What is it used for?
- Web APIs and application data
- Configuration and export files
- Data exchange between programming languages
- Document-oriented databases
Which programs can open it?
- Visual Studio Code and JetBrains IDEs
- Browser developer tools
- jq and command-line programs
- Almost every modern programming language
Support across devices and browsers
JSON opens in text editors and suitable spreadsheet, development or data tools.
TextEdit, development editors and format-specific applications can read JSON.
Text editors, command-line tools and programming libraries support JSON.
Text and data editors can open JSON, with varying validation and editing features.
Files-compatible editors and development tools can display JSON.
A browser can show the text, but correct presentation or validation requires a suitable parser.
Advantages
- Clear and widely used syntax
- Supports nested objects and arrays
- Large parser and validator ecosystem
Disadvantages
- No standard comments
- Dates and binary data require conventions
- Very large files can be memory-intensive without streaming
Comparison with alternatives
YAML is often shorter and supports comments, but has a more complex syntax.
XML offers namespaces and mixed content but is more verbose for typical API data.
CSV is ideal for flat tables; JSON can store nested records and different types.
LocalFileLab support
JSON is recognized as an input. Text is read locally and handled by the matching parser.
JSON is available as a local output; available settings depend on the format.
LocalFileLab can compress JSON locally or package it in a supported archive; already compressed content will not necessarily become smaller.
A complete JSON preview is not currently available.
Complete preservation of format-specific metadata is not guaranteed.
Related formats
Frequently asked questions
Can JSON contain comments?
The JSON standard does not allow comments. JSON5 and application-specific parsers add them but are not normal JSON.
Why is my JSON invalid?
Common causes include single quotes, trailing commas and unescaped special characters.
Can JSON store binary data?
Not directly. Binary data is commonly represented as Base64 text or an external reference.