How to Open a JSON File (Windows, Mac, and Online)
A .json file is plain text, so almost any program can open it. The real question is not how to open it but how to read it: open a JSON file in Notepad and you get one unbroken line with no indentation, which is useless for anything but the smallest data. This guide covers the fastest ways to open a JSON file on Windows and Mac, in your browser, and online, and how to get it formatted so you can actually work with it.
First, what a .json file is
A file ending in .json contains JSON text: objects, arrays, strings, and numbers. It is not a binary format and needs no special app. That is why it opens in any text editor. The catch is that JSON is often saved minified (all on one line to save space), so opening it raw shows a wall of text. Every good method below either formats it for you or lets you format it after opening.
The fastest way: open it online
For reading, validating, or fixing a JSON file, an online viewer beats a desktop editor because it formats and checks the data as it opens it. Drop the file into the JSON viewer and it renders an interactive, collapsible tree so you can explore nested data instead of scrolling raw text. If you would rather read it top to bottom fully expanded, the JSON reader does that, and the JSON formatter beautifies it with proper indentation. All three run in your browser, so the file is never uploaded anywhere, which matters for exports that contain personal data or API keys.
This is also the quickest way to find out why a file will not load in your code: if it is malformed, the JSON parser points at the exact line and character that breaks.
Open a JSON file on Windows
A few options, fastest first:
- Notepad. Right-click the file, choose Open with → Notepad. It opens instantly but shows the raw, often minified text with no formatting.
- VS Code. Open the file, then press Shift+Alt+F (Format Document) to indent it properly with syntax highlighting. This is the best free desktop option for anything non-trivial.
- Your browser. Drag the
.jsonfile onto a Chrome or Firefox window. Firefox has a built-in JSON viewer with a collapsible tree; Chrome shows the raw text (an extension adds formatting).
To stop Windows asking every time, right-click the file, choose Open with → Choose another app, pick your editor, and tick Always use this app.
Open a JSON file on Mac
- TextEdit. Right-click and Open With → TextEdit for a quick look at the raw text.
- Quick Look. Select the file and press the spacebar to preview its contents without opening an app.
- VS Code. The same Shift+Option+F formats the document into readable, indented JSON.
On both platforms, the desktop editors open the file but leave the reading to you. That is the gap the online tools fill.
Which method to use
| Goal | Best option |
|---|---|
| Quick peek at the contents | Notepad / TextEdit, or Quick Look on Mac |
| Read and explore nested data | JSON viewer (collapsible tree) |
| Read straight through, formatted | JSON reader |
| Beautify and save it indented | JSON formatter |
| Find out why it is invalid | JSON parser |
| Edit as part of a project | VS Code (Format Document) |
Opening large JSON files
Very large exports (tens or hundreds of MB) can freeze a plain text editor or a browser tab, because they try to render everything at once. A few tactics help:
- Minify before you move it. If you only need to transfer or store it, the JSON minifier strips whitespace so the file is smaller and faster to load.
- Use an editor built for size. VS Code handles large files better than Notepad or TextEdit, and dedicated large-file viewers exist for gigabyte-scale data.
- Explore, do not dump. A collapsible viewer lets you open one branch at a time instead of forcing the whole structure to render, which is why it stays responsive where a raw dump does not.
Keeping it readable after you open it
Once a file is open, formatting is what makes it usable. Beautify it with the JSON formatter or pretty-print it with your preferred indent, then save. For the full set of tools that pair with this, see the roundup of free JSON tools.
Frequently asked questions
What program opens a JSON file?
Any text editor (Notepad, TextEdit, VS Code) or web browser opens it, because JSON is plain text. To read it comfortably, use an online JSON viewer that formats and validates it as it opens.
How do I open a JSON file in Chrome?
Drag the file onto a Chrome window, or press Ctrl+O (Cmd+O on Mac) and select it. Chrome shows the raw text; for a formatted, collapsible view, use an online JSON viewer instead.
Why does my JSON file open as one long line?
It was saved minified, with all whitespace removed. Run it through the JSON formatter to add indentation and line breaks so it is readable again.
Is it safe to open a JSON file online?
With these tools, yes: they process the file entirely in your browser, so nothing is uploaded to a server. That is important when the file contains personal data or credentials.
How do I open a very large JSON file without crashing my editor?
Use VS Code or a large-file viewer rather than Notepad or TextEdit, and explore it with a collapsible viewer instead of rendering the whole thing at once. Minifying it first also reduces load time.
Leave a Reply