How to open a .json file
JSON data file · Text / data
A .json file is plain text. Any text editor or web browser opens it. If it appears as one unreadable line, it is minified and you need an editor that reformats it.
What a .json file actually is
JSON stands for JavaScript Object Notation. It is a text format for structured data built from objects in braces, arrays in brackets, and key/value pairs, and it has become the default way applications exchange data.
Because it is just text, nothing special is required to read it. The difficulty people hit is presentation, not access: machine-generated JSON is usually written without line breaks to save bandwidth.
Why it will not open
Windows has no default association for .json, so double-clicking opens the "choose an app" dialog. And when it does open, minified JSON arrives as a single enormous line that is technically readable and practically useless.
Step by step
Windows
- 01Right-click the file, choose "Open with", then Notepad for a quick look.
- 02For anything real, install Visual Studio Code or Sublime Text, open the file, and press Shift+Alt+F in VS Code to format it properly.
- 03To just read it, drag the file onto a Firefox or Chrome window. Both render JSON as a collapsible tree with no setup.
macOS
- 01Right-click, choose "Open With", then TextEdit.
- 02Or drag it onto Safari, Firefox or Chrome for a formatted tree view.
- 03In Terminal, "python3 -m json.tool file.json" prints it formatted and reports the exact position of any syntax error.
What usually goes wrong
Do not paste confidential JSON into online formatters
Config files, API responses and exports routinely contain tokens, keys and personal data. Pasting them into a random web formatter sends all of it to someone else's server. Format locally in an editor or with json.tool instead.
A trailing comma breaks the whole file
JSON is stricter than JavaScript. One trailing comma or a single-quoted string makes the entire document invalid, and most parsers report a byte offset rather than a helpful message. An editor with JSON syntax checking will point at the exact character.
Programs that open .json
Our pick, in order. Every one links to the publisher's official download URL and the SHA-256 hash of the installer, so you can check the file before you run it.
- Sublime Text 4Sublime is a sophisticated cross-platform text editor for code, markup and prose.v4.0.0.420000 · 2 hashed installers92
- Microsoft Visual Studio CodeMicrosoft Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Microsoft Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.v1.130.0 · 4 hashed installers100
- Notepad++Notepad++ is a free source code editor that supports several languages.v8.9.7 · 7 hashed installers95
Also registers .json in its manifest
Taken straight from publisher manifests. Some of these handle the format for a narrow purpose rather than as their main job.
Common questions
- How do I open a JSON file in a readable format?
- Open it in a browser, which renders JSON as an expandable tree, or in a code editor such as VS Code and reformat it with Shift+Alt+F. Both turn a single minified line into an indented structure you can actually read.
- Can Excel open a JSON file?
- Yes, indirectly. In Excel go to Data, Get Data, From File, From JSON, and the Power Query editor will convert the structure into a table. It works well for flat arrays of records and poorly for deeply nested data.
- Why does my JSON file open in the browser instead of an editor?
- Because a browser has claimed the .json association. Right-click the file, choose Open with, then Choose another app, pick your editor and tick "Always use this app".