How to Open a JSON File
Published September 21, 2026
You downloaded an export from a website, or someone sent you a file ending in .json, and your computer either refuses to open it or opens it into a solid wall of braces and quotes. Windows may even ask you to pick an app from the Store.
Do not buy anything. A JSON file is plain text. Every device you own can already open it; the only real question is how to make it readable. Here is what to use on each platform, why a JSON file so often appears as one endless line, and the fastest way to turn that line into something a human can scan.
Make it readable in one click
Paste the contents in and get properly indented, line-broken JSON you can actually read — plus an instant check of whether the file is valid. It all runs in your browser, so the file is never uploaded.
Open the free JSON Formatter →What a .json file actually is
JSON stands for JavaScript Object Notation, and despite the name it is not code — it is a text format for storing structured data. Open one in any editor and you will see nested lists of "key": value pairs wrapped in curly braces and square brackets. That is the whole format.
Because it is text, the .json extension is just a label. Rename the file to .txt and it opens in Notepad; rename it back and nothing has changed. This is why “which program do I need?” has such an anticlimactic answer: any of them.
You typically meet JSON files as data exports from apps and websites, configuration files for software, API responses saved to disk, and browser or game settings.
Windows
Windows has no default app registered for .json, which is why double-clicking often produces the “How do you want to open this file?” dialogue. Pick one of these:
- Notepad — already installed and perfectly capable. Right-click the file, choose Open with, then Notepad. Turn on Word wrap under Format if the text runs off the screen. Current Windows versions handle Unix line endings correctly, so the old complaint about everything appearing on one line is usually a minified file rather than a Notepad limitation.
- Your browser — drag the file onto an open Edge, Chrome or Firefox window. All three include a built-in JSON viewer that indents the document and lets you collapse sections, which is far nicer than raw text. If the browser downloads the file instead of showing it, use Ctrl+O to open it from within the browser.
- Notepad++ or VS Code — if you work with these files regularly. Both add syntax colouring, bracket matching and a reformat command, and both open far larger files than Notepad will.
To stop the dialogue appearing every time, right-click the file, choose Open with → Choose another app, and tick “Always use this app”.
Mac
- Quick Look — select the file in Finder and press the space bar. You get a scrollable preview without opening anything, which is ideal when you only need to check what is inside.
- TextEdit — right-click, Open With → TextEdit. One warning: if TextEdit is in rich text mode it may add formatting when you save. Use Format → Make Plain Text before editing anything you intend to keep.
- Safari or Chrome — drag the file onto a browser window for the same indented, collapsible view described above.
- Terminal —
cat file.jsonprints it, andless file.jsonpages through a big one without loading it all at once.
iPhone and iPad
Tap the file in the Files app and iOS shows a text preview for most JSON files. If it refuses, tap the share icon and choose a text editor, or open the file in Safari. To read it properly:
- Open the file in Files, tap and hold the text, and choose Select All, then Copy.
- Open the JSON Formatter in Safari and paste it in.
- Tap Format. The document comes back indented and line-broken, so you can scroll through the structure instead of one unbroken paragraph.
If the file arrived as an email attachment, tap it once to preview it inside Mail — you often do not need to save it at all.
Android
Open your Files or My Files app, tap the .json file, and choose a text viewer if prompted. If nothing is offered, open Chrome, type file:///sdcard/Download/ in the address bar and tap the file from there — Chrome renders JSON with its own viewer. Any free text editor from the Play Store also works.
Why it looks like one endless line
This is the most common complaint, and it is not your editor’s fault. The file was saved minified: all the line breaks and indentation were removed to make it smaller. That is standard practice for data sent over a network or produced by an export routine, because whitespace is pure overhead for a machine.
The data is intact — it is just unformatted. Pretty-printing puts the structure back:
- Select everything in the file and copy it (Ctrl+A then Ctrl+C, or Cmd on a Mac).
- Open the JSON Formatter and paste into the top box.
- Choose your indent width and click Format.
- Read the result, or click Copy result and paste it back into a new file to keep the readable version.
If the formatter reports an error instead, the file itself is broken — a truncated download is the usual culprit. Our guide to fixing JSON syntax errors decodes the message.
Opening JSON in Excel
Excel wants rows and columns; JSON is nested, so there is no single right way to flatten it. Recent versions of Excel can import JSON through Power Query (Data → Get Data → From File → From JSON), but the expand-column steps get tedious quickly.
For a straightforward array of records, converting to CSV first is much faster — our JSON to CSV converter does it in the browser, and the resulting file opens in Excel, Numbers or Google Sheets with a double-click.
Very large files
Editors and browsers load the entire document into memory and then build a syntax tree on top of it, so a file of several hundred megabytes can freeze them. Options, in order of effort:
- Copy the first few hundred lines into a formatter — usually enough to understand the shape of the data.
- Use an editor’s large-file mode, which disables highlighting and folding.
- Use a streaming command-line tool such as
jq, which processes the file without holding all of it in memory.
Is it safe, and is the viewer private?
Opening a JSON file is safe: it is data, not a program, and a text editor will not execute anything inside it. The real consideration is confidentiality — exports and API responses routinely contain access tokens, email addresses and personal records.
That is why it matters where a viewer runs. The Toolyard JSON Formatter works entirely inside your browser, so the text you paste is never uploaded to a server. It is free, needs no account, and keeps working with the network off once the page has loaded.
Turn that wall of text into something readable
Paste, click Format, read. Free, private, no sign-up.
Open the JSON Formatter →FAQ
What program opens a JSON file?
Any text editor — Notepad, TextEdit, the Files app on iPhone, any Android text viewer. Nothing needs to be bought or installed. A dedicated viewer only adds indentation, colour and collapsible sections.
Why is my JSON file all on one line?
It was saved minified, with whitespace stripped to reduce size. The data is fine. Paste it into a formatter to restore indentation and line breaks.
Can I open JSON in Excel?
Only via Power Query, and the flattening steps are fiddly because JSON is nested. For an array of records it is quicker to convert to CSV first and open that.
Is opening a JSON file safe?
Yes — it is data, not executable code. Be mindful of the contents instead: exports often hold tokens and personal details, so prefer a viewer that runs offline in your browser.
How do I open a huge JSON file?
Use a large-file mode, a streaming tool like jq, or just copy the first few hundred lines into a formatter to see the shape of the data.