InTab

Blog

What is a JSON file, and how do you open one?

By Uxair Ijaz · 2026-11-08 · 4 min read

JSON stands for JavaScript Object Notation. It is a plain-text format for storing and sharing structured data: lists of things, settings, records and responses, written so that both people and programs can read it. A JSON file is any file that holds this text, saved with the .json extension — for example package.json, settings.json or data.json.

Because it is just text, a JSON file opens anywhere: in a browser tab, in any text editor, in a terminal or inside a tool built for it. Nothing below installs anything.

What the inside of a JSON file looks like

{
  "name": "Ada Lovelace",
  "age": 36,
  "developer": true,
  "skills": ["math", "code"],
  "address": { "city": "London", "postcode": "W1" }
}

The whole format is a handful of rules:

Piece Looks like Meaning
Object { "key": value } Named fields inside curly braces
Array [ "a", "b" ] An ordered list in square brackets
String "Ada" Always double quotes, never single
Number 36, 3.14, -1 No quotes
Boolean true, false Lowercase
Null null "nothing here", also lowercase

Everything else — spacing, indentation, line breaks — is for humans. {"a":1} and the same data spread over twenty lines are the same JSON to a computer.

Where you will meet .json files

  • Config files: package.json for Node projects, tsconfig.json for TypeScript, settings.json for VS Code, launchSettings.json for .NET.
  • APIs: almost every modern API answers a request with JSON.
  • Data exchange: exports from databases, logs (one JSON object per line, called NDJSON), translations, app state.
  • Metadata: composer.json, manifest.json, .vscode/*.json, browser extension manifests.

How to open a JSON file: six ways

1. In a browser tab (no install) Drop the file into a formatter such as the JSON Formatter. You get colour-highlighted, indented output, and it tells you straight away if the file is broken. Nothing is uploaded — the file is read in your browser.

2. In Notepad or any text editor Right-click the file → Open with → Notepad. You will see the raw text. Works for small files; big ones become one unreadable line if they were minified.

3. In VS Code Open the file as usual. VS Code colours it, folds blocks and flags syntax errors. Note that VS Code tolerates comments in some settings files (that dialect is called JSONC), so a file can look fine there and still fail a strict parser.

4. In a terminal

cat data.json          # show the raw text
jq . data.json         # pretty-print it (jq installed)
jq -S . data.json      # pretty-print with keys sorted

5. In Excel, for tabular JSON If the file is a list of records you want as rows and columns, convert it first: the Data Format Converter turns JSON into CSV (flattening nested fields into columns), and the CSV ↔ Excel Converter turns that CSV into a real .xlsx.

6. On a phone The same formatter works in a mobile browser: open the page, paste the file's contents (or open the file), choose Beautify.

The error you will hit most: "invalid JSON"

Files written by hand or exported by older tools often fail strict parsers for small reasons: a trailing comma, single quotes, // comments (JSON has none), or unquoted keys. The JSON Validator points at the exact line and column and explains the fix; the formatter's Auto-fix repairs most of these automatically.

A one-paragraph history

JSON was specified by Douglas Crockford in the early 2000s, taking advantage of JavaScript's object-literal syntax. It displaced XML for APIs because it is shorter, needs no closing tags, maps directly to the arrays and dictionaries of almost every language, and has exactly two structures: objects and arrays. That simplicity is why "JSON" now appears in everything from package.json to smart-home configs.

FAQ

What does JSON stand for? JavaScript Object Notation. Despite the name, it is language-independent: Python, Java, C#, Go and PHP all read and write it with built-in libraries.

Is a JSON file a text file or a binary file? Text. You can open any .json file in Notepad and read it. There is no binary JSON in common use (some databases use internal binary encodings, but files you meet end in .json and are text).

How do I view a JSON file without installing anything? Paste or drop it into the JSON Formatter in your browser tab and choose Beautify. It shows the file indented and colour-coded, and works offline once loaded.

What is the difference between .json and .txt? Only the extension. Both are plain text; .json promises the content follows JSON syntax, so editors and tools can check, colour and format it.

Is JSON a programming language? No. It is a data format with no logic: no variables, functions or conditionals — just objects, arrays, strings, numbers, booleans and null.

Can Excel open a JSON file directly? Not usefully: modern Excel imports JSON through Power Query, which is slow to reach and flattens awkwardly. Converting JSON → CSV → .xlsx with the Data Format Converter and the CSV ↔ Excel Converter gives you a normal spreadsheet in two clicks.

Why does my JSON file fail even though it looks fine? The usual suspects: a trailing comma before a closing bracket, single quotes instead of double, a comment, or unquoted keys. The JSON Validator names the line, column and fix.

Which is better, JSON, XML or YAML? For APIs and config that machines read, JSON. For human-edited config, YAML. For document markup and SOAP, XML. A short comparison is in JSON vs YAML vs XML.

Tools in this article

  • JSON Formatter: Beautify, minify, validate and view JSON online. Handles escaped and stringified JSON.
  • JSON Validator: Check JSON is valid and see the exact line, column and a fix hint. Free JSON lint and syntax checker.
  • Data Format Converter: Convert between JSON, YAML, XML, CSV and TOML: JSON to CSV, CSV to JSON and more.
  • CSV ↔ Excel Converter: Convert CSV to Excel (.xlsx) and Excel sheets to CSV or JSON, with a preview.