JSON File
JavaScript Object Notation (.json)
What is a JSON file?
A JSON file stores structured data in plain text using key/value pairs and arrays. It’s widely used for APIs, app settings, and data exchange because it’s lightweight, human-readable, and easy for programs to parse.
Common uses
- API responses and web app data exchange
- Configuration files for apps and tools
- Saving/exporting structured data
- Game saves and app state (sometimes)
- Data pipelines and automation scripts
How to open a JSON file
- Windows/macOS/Linux: VS Code, Notepad++, any text editor
- Online: JSON viewers/formatters or open in a browser
- Tip: Use a formatter to pretty-print large JSON for readability
- Safety: JSON is usually safe as text, but don’t run unknown scripts or installers
Common problems
- Invalid JSON (missing commas/brackets/quotes)
- Wrong encoding causes strange characters
- Trailing commas break strict parsers
- Huge files are hard to view without a proper editor
- Some apps expect a specific schema/field names
History
JSON became popular in the 2000s as a simple way to exchange data on the web, especially as an alternative to XML. It’s now one of the most common formats for modern APIs and configuration files because it balances simplicity with structure.