Quick answer: A JSON file is plain text, so any text editor or web browser can open it. Right-click the file, choose Open with, and pick Notepad, TextEdit, VS Code, or Chrome. If it shows up as one unreadable line, paste it into a free JSON formatter to add indentation.
Someone sent you a file ending in .json. Maybe it is an export from a web app, a data download from Google or Facebook, a game save, or a config file a developer asked you to check. You double-click it and either nothing happens or Windows asks what app to use.
Here is the reassuring part: there is nothing to install. JSON is text. This guide shows the fastest way to open one on every device, how to make it readable, and how to edit it without breaking it.
Open a valid sample in the JSON Viewer to explore objects and arrays as collapsible nodes alongside the formatted code.
What Is a JSON File?
JSON (JavaScript Object Notation) is a text format for storing structured data. A small file looks like this:
{
"name": "Priya Nair",
"email": "priya@example.com",
"orders": 12,
"premium": true
}
Curly braces hold a set of labelled values, square brackets hold lists, and text sits inside double quotes. Apps use it to move data between a server and your screen, which is why exports from most online services arrive in this format. If you want the full picture, start with What is JSON?. For opening and reading one, the example above is all you need.
How to Open a JSON File on Windows
- Right-click the file in File Explorer.
- Choose Open with, then Notepad. If Notepad is not listed, pick Choose another app and find it there.
- Tick Always use this app if you want double-click to work next time.
Notepad opens anything, but it does not colour the text or check for mistakes. For regular use, install VS Code (free). It highlights keys and values, folds sections, and flags a missing comma instantly. Our VS Code JSON guide walks through the setup.
Tip: dragging the file onto an open Microsoft Edge or Chrome window also works, and the browser shows the data as a collapsible tree.
How to Open a JSON File on Mac
- Right-click (or Control-click) the file in Finder.
- Choose Open With, then TextEdit.
- Press the space bar with the file selected for a Quick Look preview if you only need to glance at it.
One TextEdit gotcha: it may open in rich-text mode and add formatting when you save. Before editing, go to Format > Make Plain Text. Safari and Chrome on Mac open JSON files directly too. Developers usually reach for VS Code, Sublime Text, or the Terminal command cat file.json | python3 -m json.tool which prints the file with indentation.
How to Open a JSON File in a Browser
This is often the best option for reading, because Firefox and Chrome render JSON as an interactive tree you can expand and collapse.
- Open a new browser tab.
- Drag the file into the tab, or press Ctrl+O (Windows) / Cmd+O (Mac) and select it.
- In Firefox, switch between the JSON, Raw Data, and Headers tabs at the top. Chrome and Edge show the raw text and offer a Pretty-print checkbox.
Browsers cannot edit the file, but for reading and searching a large export they beat a text editor. If the file is tens of megabytes, our roundup of browser JSON formatters for large responses compares which ones stay responsive.
How to Open a JSON File on Android or iPhone
Android: open the Files app, tap the .json file, and choose a text editor or your browser from the list. If no app volunteers, long-press the file and use Open with.
iPhone and iPad: in the Files app, tap the file to preview it. The preview is read-only. To edit, use the Share button and send it to a text editor app, or to a notes app that handles plain text.
On either phone, the fastest way to get readable formatting is to open JSON Prettifier in the browser, paste the content, and tap Format. The page is mobile-friendly and processes everything on the device, so an export containing your personal data never gets uploaded anywhere.
Make a One-Line JSON File Readable
Many exports are minified: every line break and space was removed to make the file smaller, so it opens as a single enormous line. Nothing is broken. To restore the structure:
- Open the file in any editor and copy everything (Ctrl+A, Ctrl+C).
- Paste it into the left panel of JSON Prettifier, or drag the file onto the page.
- Click Format. Each value moves to its own indented line with colour highlighting.
- Click Download to save the readable version as a new
.jsonfile.
Prefer the command line? JSON pretty print shows the one-liners for Python, Node.js, and jq.
How to Edit a JSON File Safely
Editing is where most beginners break the file. JSON is strict about punctuation. Keep these rules in mind:
- Text values and key names need straight double quotes:
"name", not curly quotes or single quotes. - Every item except the last in a list or object ends with a comma. A comma after the last item is an error.
- Numbers,
true,false, andnullare written without quotes. - Save as plain text with a
.jsonextension, not.txtor.rtf.
After editing, paste the result into a validator and click Validate. It tells you the exact line of any mistake, which beats reopening the app to see whether it still works. The ten most common JSON errors explains each message you might see.
Opening JSON in Excel or Google Sheets
If the file is a list of records, such as orders or contacts, you may want it in a spreadsheet.
Excel for Windows: go to Data > Get Data > From File > From JSON. Power Query loads the file; click To Table, then use the expand icon on the column header to turn each key into its own column. Excel for Mac added the same connector in recent versions.
Google Sheets: there is no built-in JSON import. Convert the file to CSV first, or use an Apps Script. For nested data, flatten it before importing or the columns become unreadable.
Which Method Should You Use?
| Goal | Best option | Why |
|---|---|---|
| Quick look at a small file | Notepad / TextEdit / Quick Look | Already installed, opens instantly |
| Read a large export | Firefox or Chrome | Collapsible tree, search, no memory issues |
| Make a one-line file readable | Online formatter | One click, works on phone, nothing uploaded |
| Edit and check for mistakes | VS Code | Highlighting, error underlines, auto-format |
| Analyse records in rows and columns | Excel Power Query | Turns arrays of objects into a table |