Back to blog
Fundamentals6 min read

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

Open and read JSON files anywhere: text editors, browsers, VS Code, command-line tools, and online viewers. Plus how to make minified JSON readable and fix a file that will not open.

By Saifur Rahman Shochib

A .json file is just plain text, so opening one is easy — but reading it comfortably is another matter, especially when it arrives minified onto a single 5,000-character line. This guide covers how to open JSON files on any platform, the best tools for actually reading them, and what to do when a file will not open or looks like gibberish.

JSON files are plain text

Despite the special extension, a .json file contains nothing but UTF-8 text. Any program that opens text can open it — Notepad, TextEdit, vim, or your code editor. The extension simply signals to tools and humans that the content is JSON. That means you never need special software, though the right tool makes the content far easier to read.

Opening JSON on Windows

On Windows, right-click the file and choose Open with, then pick Notepad for a quick look or, far better, Visual Studio Code or Notepad++ for syntax highlighting and folding. To avoid the file launching in a browser or another app by default, use Open with rather than double-clicking. VS Code can also format the file on open, turning a minified blob into readable, indented JSON.

Opening JSON on Mac and Linux

On macOS, open the file with TextEdit for a basic view or VS Code for highlighting; in Terminal, cat shows it and python3 -m json.tool file.json pretty-prints it instantly. On Linux the same command-line options apply, and jq . file.json formats and colorizes the output. These built-in tools are the fastest way to read a file without installing anything.

Read and pretty-print from the terminalbash
cat data.json
python3 -m json.tool data.json   # pretty-print
jq . data.json                   # format and colorize

Opening JSON in a browser

Dragging a .json file into a browser tab displays it, and modern browsers render it with basic formatting and collapsible nodes through their developer tools. For a quick read with no setup this works, but for anything large or that you need to search and explore, a dedicated viewer is more comfortable.

The best way to read large or minified JSON

A single-line minified file is technically open but unreadable. The fix is to format it and view it as a tree. An online JSON Viewer renders the file as a collapsible tree so you can drill into exactly the branch you need, a Formatter re-indents minified JSON into readable lines, and an Editor gives you highlighting plus inline validation. Because these run in your browser, even sensitive files stay on your machine.

When a JSON file will not open or looks wrong

If a file shows garbled characters, it may have an encoding issue or a byte-order mark; reopen it as UTF-8. If a tool reports an error, the JSON is likely invalid — a missing bracket, a trailing comma, or a truncated download. Run it through a validator to find the exact line and column, or a repair tool to fix common damage automatically.

Frequently asked questions

How do I open a JSON file?

A .json file is plain text, so open it with any text editor — Notepad, TextEdit, or ideally VS Code for syntax highlighting. For a readable, browsable view, use an online JSON viewer that renders it as a collapsible tree.

What program opens JSON files?

Any text editor opens JSON, but code editors like VS Code and Notepad++ are best for highlighting and folding. Browsers can display them, and online viewers and formatters make large or minified files readable.

How do I read a minified JSON file?

Format it. A minified file is one long line; run it through a formatter or open it in an editor that pretty-prints, which restores indentation. A tree viewer then lets you explore the structure.

Why won't my JSON file open correctly?

Usually invalid JSON (a missing bracket, trailing comma, or truncated download) or an encoding issue. Reopen it as UTF-8, and validate it to find the exact error location, then repair if needed.

Can I open a JSON file without installing software?

Yes. Use a text editor you already have, your browser, or a built-in command like python3 -m json.tool. Online viewers also work with no install and keep the file in your browser.

Related tools

Try these tools

Keep reading

Related guides