
A JSON file is plain text, so any text editor can open it: right-click it and choose Open with → Notepad on Windows or Open With → TextEdit on a Mac. The catch is that many JSON files are saved as one enormous line, which is technically open but unreadable. To actually read one, drop it into a web browser or paste its contents into a JSON formatter, which indents it and shows it as a collapsible tree. If what you really want is rows and columns, convert it with a JSON to Excel converter instead.
Which route is best depends on why you have the file. Someone checking an export from an app wants to read it once. A developer wants to edit it without breaking it. An analyst wants it in a spreadsheet. This guide covers each case on Windows, Mac and phones, plus what to do when the file refuses to open properly.
What a JSON file actually is
JSON (JavaScript Object Notation) is a text format for structured data. Apps use it for settings files, data exports, API responses and backups. Inside, you will see curly braces holding "name": value pairs and square brackets holding lists:
{"name": "Sam", "orders": [{"id": 1041, "total": 29.5}]}
Because it is just text, a JSON file cannot run anything when you open it in an editor or viewer. Double-clicking often does nothing useful because Windows and macOS usually have no default app assigned to .json, or they hand it to a code editor you did not know you had. Choosing the app yourself fixes that.
The quick answer for every device
| Where you are | Fastest way to open it | Readable layout? |
|---|---|---|
| Windows | Right-click → Open with → Notepad | Only if the file was saved with line breaks |
| Mac | Right-click → Open With → TextEdit | Same as Notepad: raw text |
| Any computer | Drag the file into Firefox, Chrome or Edge | Yes in Firefox and Edge; Chrome offers a pretty-print option |
| Phone | Open it from the Files app or a file manager, then copy the text | Rarely; paste it into a formatter |
| You need a spreadsheet | Convert JSON to Excel | Yes, as rows and columns |
How to open a JSON file on Windows
- Right-click the file and choose Open with. On Windows 11 you may need Show more options first.
- Pick Notepad. If it is not listed, choose Choose another app and find it there.
- To make this permanent, tick Always use this app to open .json files before you confirm.
Notepad shows exactly what is in the file, nothing more. If the JSON was written by a program that strips whitespace to save space, you will see a single line that scrolls sideways forever. That is normal and the file is not damaged.
For files you open often, a code editor such as Visual Studio Code is more comfortable: it colours keys and values, lets you fold sections, and can reformat the whole file with one command. Notepad++ does a similar job with a JSON plugin installed.
How to open a JSON file on a Mac
- Right-click (or Control-click) the file and choose Open With → TextEdit.
- If TextEdit is not suggested, choose Other… and pick it from Applications.
- To set it as the default, select the file, press Command-I, change Open with and click Change All.
You can also select the file in Finder and press the space bar for a Quick Look preview, which is handy for a fast peek. Like Notepad, TextEdit and Quick Look show the raw text, so a minified file still looks like one long paragraph.
Open it in a web browser for a readable view
The easiest no-install upgrade is your browser. Drag the JSON file onto an open browser window, or press Ctrl+O (Command-O on a Mac) and select it.
- Firefox has a built-in JSON viewer with tabs for a collapsible view, the raw data and a pretty-printed version, plus a filter box for finding a key.
- Microsoft Edge also formats JSON automatically in recent versions.
- Chrome shows the raw text, and recent versions add a Pretty-print checkbox at the top of the page that indents it.
This is the quickest way to answer questions like "what did this app export about me?" without installing anything.
Make it readable with a JSON formatter
When the browser view is not enough, or you are on a computer where you cannot change settings, a formatter does the job in seconds:
- Open the file in Notepad, TextEdit or your phone's file viewer, select all of the text and copy it.
- Paste it into Toolyfied's JSON formatter.
- Read the indented result, or switch to the tree view and expand only the parts you care about.
- If the formatter flags an error, it points you at the problem, such as a trailing comma or a missing bracket.
The formatter works on the text you paste in the page itself; it does not need you to upload the file. Even so, a sensible habit with any online tool is to strip out passwords, API keys and access tokens before pasting a config file anywhere.
How to open a JSON file on iPhone or Android
Phones are the awkward case, because neither system ships a proper JSON viewer.
- iPhone and iPad: tap the file in the Files app. The preview usually shows the raw text. If it does, you can select and copy it; if not, use the share button to open it in any text-editor app.
- Android: what happens depends on your file manager. Some show the text, others say no app can open the file. Installing any plain-text editor solves it.
Once you can copy the text, paste it into the formatter in your mobile browser and you get the same indented view and tree as on a computer. For long files, a tree view is far easier to navigate on a small screen than scrolling through raw text.
How to open a JSON file in Excel
If the JSON is a list of similar records, such as orders, contacts or survey answers, a spreadsheet is the natural way to read it. You have two options:
- Excel's own import: in Excel for Microsoft 365 on Windows, go to Data → Get Data → From File → From JSON. Power Query opens, and you click through to expand the records into a table. It is powerful but takes a few steps if the data is nested.
- A converter: upload the file to the JSON to Excel converter and download an XLSX. It suits files that hold an array of objects, which is how most exports are shaped. If you need CSV rather than XLSX, run the result through the Excel to CSV converter afterwards.
Unlike the formatter, the converters process your file on Toolyfied's server. Files are used only to produce your download and old files are cleaned up automatically every day, but the same rule applies: do not upload data you are not allowed to share.
When a JSON file will not open properly
If a viewer or formatter reports an error, the file usually falls into one of these cases:
- It is JSON Lines. Files ending in
.jsonl, and some.jsonexports, hold one separate object per line. Each line is valid on its own, but the file as a whole is not a single JSON document, so strict validators complain. Format one line at a time, or wrap the lines in square brackets and separate them with commas. - The download was cut short. A file that ends mid-word, with no closing bracket, is truncated. Download or export it again.
- It is not really JSON. If the text starts with
<!DOCTYPE html>or<html>, you saved an error page with a .json name. The real data never arrived. - Someone edited it by hand. Single quotes instead of double quotes, a comma after the last item, or a comment line will all break strict JSON. Our guide to fixing invalid JSON walks through each of these.
Editing a JSON file without breaking it
Opening is safe; editing is where files get damaged. Keep a copy of the original first. Change only values, not the punctuation around them, and keep text values inside double quotes. When you are done, paste the whole file into the formatter to confirm it still validates before you put it back where the app expects it. Save it as plain text with the .json extension, and make sure TextEdit has not switched to rich text (Format → Make Plain Text).
Frequently Asked Questions
What program opens a JSON file?
Any plain-text editor opens a JSON file: Notepad on Windows, TextEdit on a Mac, or a code editor such as Visual Studio Code. Web browsers open them too, and Firefox and Edge format them into a readable view automatically.
How do I open a JSON file in Excel?
In Excel for Microsoft 365 on Windows, use Data → Get Data → From File → From JSON and expand the records in Power Query. A quicker route for typical exports is to upload the file to a JSON to Excel converter and download a ready-made XLSX.
Why does my JSON file show as one long line?
The program that created it removed the line breaks and indentation to save space. The data is fine. Paste it into a JSON formatter or open it in Firefox to see it indented and nested properly.
Can I open a JSON file on my iPhone or Android phone?
Yes, but phones have no real JSON viewer. Open the file from the Files app or your file manager, copy the text, and paste it into an online JSON formatter in your mobile browser. If the file will not open at all, any text-editor app can read it.
Is it safe to open a JSON file?
Opening a JSON file in a text editor, browser or formatter is safe because it is plain data, not a program. The real risk is what is inside: config files can contain passwords or API keys, so do not paste or upload those to any website.
How do I edit a JSON file without breaking it?
Keep a backup, change only the values, and keep text inside double quotes. Before saving, paste the file into a JSON validator to confirm it still parses, then save it as plain text with the .json extension.



