How to Open a JSON File (and Actually Read It)
A .json file is plain text, so any text editor opens it. The problem is usually readability. Drag it into a browser tab, or open it in the free VS Code, to see it properly formatted.
Opening a .json file isn’t actually the hard part. Notepad, TextEdit, or any code editor opens it right away, with nothing to install.
The trouble shows up a moment later.
Many .json files load as one impossibly long line, with no spacing or breaks anywhere.
That’s not a broken file. It just needs reformatting before a person can read it.
What a .json file actually is
JSON stands for JavaScript Object Notation. It’s a plain text data format, not a document and not a program.
Apps and websites use it constantly, for settings, exports, and moving data between systems. You might export your data from a service and get a .json back, or a program might quietly store its settings in one. A browser extension often saves its data the same way.
Nothing needs to be installed to open one, because it is already plain text. Notepad on Windows and TextEdit on Mac both open a .json file immediately.
It works a lot like the generic .dat file, a catch-all format that many unrelated programs use for their own data.
If your file manager hides the .json ending entirely, it’s worth confirming what you actually have first. Here’s how to show file extensions in Windows so you can see the real name.
Why it looks like a wall of text
Most .json files you download or export get “minified.” Every line break and space gets stripped out before the file is sent.
Smaller files move faster, which is the whole point.
The result is one dense, unbroken line of text.
Line breaks and indentation exist for people, not for the data itself. Stripping them out changes nothing that the program reading the file actually cares about.
That’s still completely valid JSON. Nothing is missing or damaged.
It just needs reformatting before you can follow it.
The best free ways to read it properly
A few free options turn a minified .json file into something you can actually follow.
- A browser tab. Chrome, Firefox, and Edge all include a built-in, collapsible JSON viewer. Drag the file onto an open tab to use it.
- Visual Studio Code. A free code editor, at code.visualstudio.com, that color codes JSON and can reformat a minified file with Format Document.
- Notepad++. A lighter, Windows-only option if VS Code feels like more than you need.
- An online JSON formatter. These sites reformat the file for you, right in the browser, with nothing to install.
The browser option is the fastest. Collapsing a section shows you the overall shape without scrolling through everything.
For editing or repeat use, VS Code is worth the one-time install.
- Install VS Code, free at code.visualstudio.com.
- Open your .json file in it.
- Run Format Document.
- The file reflows into properly indented, readable JSON.
Keep private data out of online formatters. Pasting a file into one of these sites sends its content to someone else’s server. Do not paste anything confidential into an online tool.
A browser tab or VS Code avoids that risk entirely, since the file never has to leave your computer.
Skip Microsoft Word for this
Word can technically open a .json file, since it’s just text.
That doesn’t make it the right tool. Word adds its own formatting, and saving from Word can break the file for whatever program needs to read it. It can quietly swap in curly quotes or other characters that are not valid inside JSON.
Stick to a plain text editor or a code editor instead.
Editing a .json file without breaking it
You can edit a .json file directly, but the format is strict about punctuation.
A single missing or extra comma, quote, or brace can make the whole file invalid. Notepad won’t warn you about any of this while you type.
A code editor like VS Code underlines the mistake as you go, which is one more reason to edit there instead of in Notepad.
If a program rejects your edited file afterward, check for a missing or extra comma first. It’s the most common cause by far.
Frequently asked questions
What program opens a .json file?
Any text editor opens it, including Notepad. A browser tab or the free VS Code shows it properly formatted instead.
Why is my .json file all on one line?
It has been minified to save space. The file is still valid, it just has no line breaks for a person to follow.
Can I edit a .json file safely?
Yes, if you watch the punctuation carefully. A code editor flags a missing comma or brace, while a plain text editor stays silent.
Is it safe to delete a .json file?
That depends on what created it. A .json is often an app’s settings or exported data, so check what made the file first.
Can Excel open a .json file?
Excel can import JSON data into a spreadsheet. A browser tab or text editor is simpler if you only want to read it.