{ } JSON Workbench0 network requests. Check DevTools

How to open a JSON file

A JSON file (extension .json) is just plain text, so you can open it in any text editor, in your web browser, or in an online viewer. The quickest way to actually read one, formatted, colored, and foldable, is to paste its contents into the JSON Viewer. It runs entirely in your browser, so the file never leaves your machine. Below are all the ways to open a JSON file, on any device.

Fastest: open it online (formatted)

  1. Open the JSON Viewer or the JSON Formatter.
  2. Open the .json file in any text editor, select all, and copy, or use the tool's Open-file button.
  3. Paste it in. You get a readable, syntax-colored tree you can collapse and search.

Because it is 100% in-browser, this is also the safe way to open a JSON file that contains API keys, tokens, or personal data. Nothing is uploaded, see the note on safety below.

Open a JSON file in a web browser

Every browser can display JSON. Drag the .json file onto an open tab, or press Ctrl+O (Cmd+O on Mac) and select it. Chrome and Firefox show the raw text (Firefox even adds a basic viewer). For folding, searching, and formatting a large file, an online JSON Viewer is far more comfortable.

Open a JSON file in a code editor

Code editors give you syntax colors, folding, and validation:

Open a JSON file on Windows

  1. Right-click the .json file and choose Open with.
  2. Pick Notepad, VS Code, or your browser.
  3. To make it the default, choose Open with › Choose another app, pick the app, and tick Always use this app to open .json files.

Notepad shows JSON unformatted (often on one line). To read it, paste it into the JSON Formatter.

Open a JSON file on a Mac

  1. Right-click (or Control-click) the file and choose Open With.
  2. Pick TextEdit, VS Code, or a browser.
  3. To change the default, select the file, press Cmd+I, expand Open with, choose an app, and click Change All.

Open a JSON file on a phone

On iOS and Android, tap the .json file and choose a text editor or browser, or open a mobile browser and paste the contents into the JSON Viewer, which works on touch screens.

Problem: the JSON is unreadable or too big

A note on safety

JSON files often contain sensitive data: access tokens, API keys, config secrets, or personal information. Many "open JSON online" websites upload your file to their servers to process it, which is a real leak risk. The tools here run entirely in your browser and make zero network requests, so your file is never uploaded, logged, or seen by anyone. You can confirm it: open your browser's developer tools, watch the Network tab, and use any tool, nothing leaves the page.

Frequently asked questions

What program opens a JSON file?

Any text editor or web browser opens a .json file, because it is plain text. For a readable, colored, collapsible view use a JSON viewer or a code editor like VS Code. Notepad (Windows) and TextEdit (Mac) also work but show it unformatted.

How do I open a JSON file in a browser?

Drag the .json file onto an open browser tab, or press Ctrl+O (Cmd+O on Mac) and choose the file. Chrome and Firefox display the JSON as text. For a formatted tree with folding and search, paste it into an online JSON viewer instead.

How do I open a JSON file on Windows?

Right-click the file, choose Open with, and pick Notepad, VS Code, or your browser. To always use one of them, choose Open with, then Choose another app, and tick Always use this app.

How do I open a JSON file on a Mac?

Right-click (or Control-click) the file, choose Open With, and pick TextEdit, VS Code, or a browser. TextEdit opens it as plain text; a JSON viewer or code editor shows it formatted and colored.

Why is my JSON file all on one line?

It has been minified: whitespace was removed to save space. It is still valid; it is just hard to read. Paste it into a JSON formatter to pretty-print it with indentation and colors.

Is it safe to open a JSON file online?

It depends on the tool. Many online viewers upload your file to their servers. This site processes everything in your browser with zero network requests, so a .json file containing tokens, keys, or personal data never leaves your machine. Verify it yourself in the browser's Network tab.