How to Open a JSON File
Last updated 19 August 2026 · about 5 minutes to read
What opens a .json file on Windows, macOS and the web, why a browser is often the best answer, and how to read a large one without scrolling through it.
A .json file is plain text. Anything that opens a text file opens it, which means the question is not really how to open it but how to read it once it is open, because a JSON document of any size is unreadable as a single line of text.
The quickest answers
- Any browser. Drag the file onto a browser window. Chrome, Firefox and Edge all render JSON as a collapsible tree rather than as raw text, which is usually all anyone wanted.
- A text editor. Notepad, TextEdit, VS Code, Sublime. VS Code will also format it: open the file and press Shift+Alt+F, or Shift+Option+F on a Mac.
- The JSON viewer on this site, which shows it as a tree you can collapse, without the file leaving your machine.
What not to use is Excel. It will offer to import a .json file and the result depends on Power Query guessing your structure correctly, which for anything nested it will not.
Making the file open in the right thing
On Windows, right-click the file, choose Open with, then Choose another app, pick your editor and tick Always use this app. On macOS, select the file, press Command+I, change Open with, and press Change All.
Windows hides known file extensions by default, so a file shown as data may be data.json. Turn extensions on in File Explorer under View if you are not sure what you have.
Reading a large one
Past a few thousand lines, scrolling stops being a way to find anything. Three approaches work.
- A tree view. Collapse everything, then open only the branch you care about. This is what a browser gives you for free and what the viewer here does.
- Convert it to a table. If the document is a list of records, which most are, a spreadsheet is far easier to scan than a tree. That is what the JSON to CSV and JSON to Excel converters are for.
- Search rather than scroll. Find-in-page in a browser searches the rendered tree, which beats reading it.
When it will not open, or opens as nonsense
- It downloaded as .json.txt. Windows adds the extension when a browser is unsure of the type. Rename it.
- It is one enormous line. That is minified JSON, which is valid and unreadable. Any formatter expands it, including the one here.
- It is not valid JSON. A trailing comma, single quotes, unquoted keys or comments are all things JavaScript allows and JSON does not. A validator will tell you the line and column rather than leaving you to find it.
- Every line is its own object with no wrapping brackets. That is JSON Lines, not JSON, and it is a different format with its own reasons for existing.
A note on opening files you did not create
A .json file cannot execute anything by itself, so opening one in an editor or a viewer is safe in a way that opening an unknown spreadsheet is not. What is inside it may still be untrustworthy data, which matters when you feed it to something else, but the act of looking is not the risk.