How to open a JSON file
A .json file is plain text, so anything that opens a text file opens it — Notepad, TextEdit, VS Code, or a browser window. There is nothing to install and nothing to buy.
The catch is that plain text is a bad way to read JSON. Files are often saved with the whitespace stripped, so a text editor shows you one enormous line. The quickest fix is to open it as a tree.
Fastest: open it here
Drag the file into the JSON viewer and it opens as a collapsible tree, whatever state it was saved in. It runs entirely in your browser — the file is never uploaded, which matters because exports and config files routinely contain tokens and personal data.
Below is what that looks like: the raw file on the left, the same file as a tree on the right.
{
"app": "Express Lint",
"version": "2.4.0",
"settings": {
"theme": "midnight",
"autosave": true,
"tabWidth": 2
},
"recentFiles": ["config.json", "package.json"],
"lastOpened": null
}A typical settings file. Click any row on the right to open or close it.
Opening it on your own machine
Windows
- Right-click the file → Open with → Notepad. It will open, but everything may be on one line.
- Better: Notepad++ or VS Code, both of which colour the syntax and fold the sections.
- Do NOT double-click it. Windows often has no default app for .json, so you get the "How do you want to open this file?" dialog — and if something once claimed the extension, double-clicking can launch the wrong program.
macOS
- Right-click → Open With → TextEdit. It opens as plain text.
- Quick Look (select the file, press Space) shows the contents without opening anything.
- From Terminal: cat file.json, or open -e file.json for TextEdit.
Linux
- Any text editor: gedit, nano, vim, Kate.
- cat file.json prints it; less file.json scrolls it.
- If jq is installed, jq . file.json pretty-prints and colours it in one step.
A browser
- Drag the file onto any browser window, or press Ctrl/Cmd+O and pick it.
- Firefox has a built-in JSON viewer with a collapsible tree — the best of the browsers for this.
- Chrome and Safari show the raw text, which is hard to read for anything minified.
Phone or tablet
- Both iOS and Android will usually offer to open a .json in a text or files app.
- If nothing will open it, share it to your browser and use this page — it works the same on a phone.
- Avoid installing a "JSON opener" app. There is nothing to install; it is a text file.
When it opens but you cannot read it
This is the usual problem, and it is not a broken file. Whitespace means nothing to a program, so most services strip it before sending — which leaves you with a single line thousands of characters long. Run it through the JSON formatter and it comes back on readable lines with the original data untouched.
When it will not open at all
If an editor opens it and a program refuses it, the file is almost certainly invalid rather than unopenable. The JSON validator reports the exact line and column and repairs the common mistakes — a trailing comma, single quotes, unquoted keys. Two things worth checking first:
- It might be JSON Lines. If the file is one complete JSON object per line with no wrapping
[ ], it is.jsonl— a different format. Each line parses on its own; the whole file does not. - It might not be JSON. Files get the wrong extension. If it starts with
<it is XML or HTML — often an error page saved by mistake, which is exactly what producesinvalid character '<'.
A note on “JSON opener” downloads
You do not need one, and the search results for them are not a good neighbourhood. A JSON file is text: the software to read it is already on your computer. If you want something better than Notepad, install a real editor like VS Code rather than a single-purpose “file opener”.
Related
- What is a JSON file? — what the format is, and the six types it has.
- JSON viewer — open a file as a tree, search it, copy the path to any value.
- JSON error reference — every common parse error, explained with the fix.
Every tool linked from this page runs entirely in your browser. Nothing you open is uploaded, stored or logged.