A .json file is just a plain text file containing structured data. The challenge is not opening it — it is reading it, because raw JSON is often a single unformatted line. This guide shows the easiest way to open and actually read a JSON file on Windows, Mac, in the browser, and in code editors.
What is a JSON file?
JSON (JavaScript Object Notation) is a text format for storing data as key-value pairs and lists. Because it is plain text, almost any program can open it — but most will not display it in a readable way.
Easiest: open it online (no software)
The quickest way to read a JSON file is to paste its contents into an online formatter. It instantly indents and color-codes the data, validates the syntax, and lets you collapse sections — without installing anything.
Open & format any JSON instantly
Paste your JSON and read it beautifully formatted with syntax highlighting. Runs entirely in your browser — your data never leaves your device.
On Windows
- Notepad: Right-click → Open with → Notepad. Works, but shows raw text.
- Notepad++: Free editor with a JSON Viewer plugin that formats and folds the data.
- VS Code: Open the file, then press
Shift+Alt+Fto auto-format. - Browser: Drag the file into Chrome or Firefox to see a collapsible tree.
On Mac
- TextEdit: Right-click → Open With → TextEdit.
- VS Code: Open and press
Shift+Option+Fto format. - Terminal: Run
cat file.json | python3 -m json.toolto pretty-print.
In VS Code (best for developers)
- Open the
.jsonfile. - Press
Shift+Alt+F(Windows) orShift+Option+F(Mac) to auto-format. - Click the gutter arrows to collapse and expand sections.
- VS Code underlines syntax errors in red automatically.
Why your JSON file looks like one giant line
JSON is often "minified" — all whitespace removed — to save space. This is valid JSON, just unreadable. Running it through a formatter restores the indentation so you can read it.
Common problems
- Garbled characters: The file may be in the wrong encoding. Open it as UTF-8.
- "Invalid JSON" when formatting: The file has a syntax error — a validator shows where.