How to Open a JSON File on Windows, Mac and Online

By Free JSON Tools team · Published 18 November 2026 · Updated 18 November 2026

A JSON file is plain text, so opening one needs no special software. Any plain-text editor can open it, a browser can display it, and free online tools can check and tidy it. This guide covers the certain steps for Windows, Mac, browsers, online tools, and code — and one safety warning worth reading before you open a file from someone you do not know.

Photo coming soon. A matched original photograph for this page is being sourced. The tool and guide below are complete and fully working.
Check your JSON now. Paste it into the free JSON validator — it reports the exact line, column and cause of the first error, and nothing you paste ever leaves your device.

The short answer

If you only need to read a JSON file, open it in any plain-text editor. The contents will appear as text, which you can read, search, and copy. If the file appears as one long unreadable line, it has been minified — paste it into the pretty-print tool to spread it over many lines with indentation.

If a program complains that the file is not valid JSON, paste its contents into the JSON validator to find the first error and its position. Both tools run in your browser, so the file contents never leave your device.

On Windows

Windows Notepad can open a JSON file. Open Notepad, then use File > Open to choose the file, and its contents will appear as text. For larger files, or files you need to edit often, a code editor such as VS Code is a better choice: it opens .json files directly and highlights the structure, which makes brackets and quotes easier to follow.

Avoid opening JSON in a word processor. Word processors are built for formatted documents, not plain text, and they can change characters in ways that break the file. Stick to a plain-text editor for reading, and to a code editor for editing.

On a Mac

On a Mac, TextEdit can open a JSON file, provided it is in plain-text mode. Open TextEdit, then use File > Open to choose the file, and check that the editor is treating it as plain text before you read or edit it. If TextEdit is in its rich-text mode, it may handle the file as a formatted document, which is not what you want for JSON.

VS Code is also available on the Mac and opens .json files directly, with highlighting that makes the structure easier to follow. As on Windows, a word processor is the wrong tool for a plain-text format like JSON.

In a browser or online

A browser can display a local JSON file. Drag the file onto a browser window, or use File > Open in the browser to choose it, and the browser will show the file contents. This is a quick way to read a file without opening an editor, though a browser is for viewing rather than editing.

For anything more than a quick look, paste the file contents into the free online tools on this site. The validator checks whether the contents are valid JSON, and the pretty-print tool makes minified JSON readable. Both run entirely in your browser, so nothing is uploaded.

In code

Programs rarely need a human to open a JSON file — they read it directly. The three common ways are:

fetch('data.json')
  .then(response => response.json())
  .then(data => console.log(data));
import json
data = json.load(open('file.json'))
jq '.' file.json

Each of these expects the file to contain valid JSON. If the file fails to load, the parse error guide explains how to find the fault.

A safety warning for files from strangers

JSON itself is data, not code: reading it as plain text cannot run anything. The risk comes from the app you open it with. Never open a JSON file from an untrusted sender in an app that runs scripts or macros, and never enable scripts or macros just to view data — the data never needs them.

If a file arrives unexpectedly, even from a familiar name, pause before opening it. Read it as plain text first, or check with the sender through a separate channel that they really sent it. A genuine JSON file contains only text — objects, arrays, strings, and numbers — and needs nothing more than a text editor to read.

Frequently asked questions

What program opens a JSON file?

Any plain-text editor. Windows Notepad, macOS TextEdit in plain-text mode, and VS Code can all open a .json file. A browser can display one too, and free online tools can check and tidy the contents.

Can I open a JSON file in Notepad?

Yes. Open Notepad, use File > Open to choose the file, and the contents appear as text. For large files or frequent editing, a code editor such as VS Code is more comfortable.

Can I open a JSON file in a browser?

Yes. Drag the file onto a browser window, or use File > Open in the browser. The browser displays the contents for reading, though it is not an editor.

How do I make a JSON file readable?

If the file is one long line, it has been minified. Paste its contents into the pretty-print tool on this site, which spreads the JSON over many lines with indentation, all in your browser.

Is it safe to open a JSON file?

JSON itself is data, not code, so reading it as plain text is safe. The risk is opening files from untrusted senders in apps that run scripts or macros — never enable those to view data, and check unexpected files before opening them.

How do I open a JSON file in Python?

Use the json module: import json, then call json.load on the opened file. The result is ordinary Python data — dictionaries and lists — ready to use in your program.

Why does my JSON file show as one line?

The file was minified, with all unnecessary spaces and line breaks removed to save space. The data is unchanged. A pretty-print tool restores the line breaks and indentation for reading.

Related tools and guides

Sources

Share:
Disclaimer: The tools and guidance on this page are for general use. Tools run entirely in your browser and your input never leaves your device. Always keep a backup of important data before converting or editing it.