How to Open a JSON File on Windows — and Make It Readable (Free, No Install)
You downloaded your data from an app, or a program left a settings file, and it ends in .json. Double-clicking it either asks which app to use or shows one endless line of brackets and quotes. A JSON file is just text, so you already have what you need to read it: the browser on your PC can open it and indent it with one tick. Below are the ways that work on Windows, what each one did with a real file on my PC, and what happens when the file is broken — which is where most of the ways go quiet.

Paste or drop a .json file to indent it, minify it, explore it as a tree, or find the exact line and column of a syntax error. It runs in your browser — the JSON is not sent anywhere.
- ✓ Free
- ✓ No install, no sign-up
- ✓ Runs in your browser
- ✓ Files are never uploaded
🔒 Your file is never sent to a server or anywhere else — it is processed only in your own browser.
What a JSON file is, and why it looks like one long line
JSON is a text format for data: names in double quotes, values after a colon, objects in curly braces and lists in square brackets. Apps use it for settings, for data you export from a service, and for what one program sends another. Because it is only text, opening a .json file cannot run anything — reading it in Notepad or a browser is safe.
Two things make it awkward on Windows. First, nothing may be set to open it. On my Windows 11 Home PC, assoc .json returned nothing and there was no default app for the extension, so double-clicking a .json file asks which app to use. Second, programs usually save JSON with every space and line break removed. My test file — an order history export with 6 orders, 74 keys and 5 levels of nesting — was 1,175 bytes on a single line. Indented by two spaces it became 116 lines and 2,156 bytes; by four spaces, 2,948 bytes. The spaces are only for people, so programs leave them out.
Way 1: open it in Edge or Chrome and tick Pretty-print
- 1Drag the .json file onto an open Edge or Chrome window. (Or right-click the file, choose Open with, and pick Microsoft Edge.)
- 2The text appears as it is stored — usually one long line.
- 3Tick the Pretty-print checkbox in the bar at the top of the page.
I tried this on Edge 154 and Chrome 154 on Windows 11. Both show the checkbox above the text; Chrome labels it Pretty-print, and Edge shows the same checkbox in its own interface language (on my Korean Edge it read 예쁜 인쇄). Ticking it re-indented the file by two spaces, the same layout as the 116-line version above. Nothing is installed and the file stays on your PC.
The checkbox appeared when the browser opened the file in a normal window. When I ran the same browsers in headless mode (no window, as automation tools do), the bar was missing and the raw text showed instead.
The catch is a broken file. I added one extra comma before a closing brace — "push":false,} — which makes the JSON invalid. Both browsers still showed the Pretty-print checkbox, but ticking it did nothing: the text stayed on one line and there was no message saying why. If a file will not indent, the browser is telling you it is broken without telling you where.
Way 2: a JSON formatter that shows where it broke
A JSON formatter does what the browser checkbox does and also checks the syntax. I pasted the broken file into the JSON Formatter on this site and pressed Format. It answered Line 1, Col 1102: Expected double-quoted property name in JSON, printed the line, and put a caret under the extra comma. Python reported the same spot: column 1102.
With the comma removed, Format indented the file and showed a summary: input 1.1 KB, output 2.1 KB, 74 keys, depth 5. Minify does the reverse and puts it back on one line, and the tree view lets you fold the orders list so you can read one order at a time. You can drop the .json file onto the input box instead of pasting.
Many online formatters send what you paste to a server. This one runs in the page. I checked the network log while I used it: loading the page was the only request, and formatting and validating three times added none. That matters when the JSON is a data export with your name, email and orders in it, like my test file.
Way 3: Notepad — fine for a quick look or a small edit
Notepad opens any .json file, and it is the right tool when you only need to change one value in a settings file. It does not format or check anything, so a one-line file stays one line and a missing quote is not flagged. If you edit a file this way, keep it saved as UTF-8 and check it afterwards with the browser or a formatter: if Pretty-print still works, the file is still valid JSON.
Way 4: VS Code
If you already have Visual Studio Code, it is the most comfortable place to read and edit JSON. Its documentation gives the format command as Shift+Alt+F on Windows, or Format Document from the right-click menu. It also colours the syntax and lets you fold objects. VS Code treats settings files such as settings.json as JSON with Comments, which allows comments and tolerates trailing commas — but a normal .json file that another program reads must not have either.
Way 5: the command line — and two defaults that bite
Python ships a JSON formatter. Run it with the file name and it prints the file indented by four spaces:
python -m json.tool --no-ensure-ascii data.jsonLeave out --no-ensure-ascii and every non-English character is printed as an escape: in my file the name 김민수 came out as \uae40\ubbfc\uc218. It is still the same data, but you cannot read it. On the broken file Python stopped with Expecting property name enclosed in double quotes: line 1 column 1102 (char 1101) — a precise location.
Windows PowerShell 5.1, the version built into Windows, can read JSON too, but its writer has a trap. I read the file with ConvertFrom-Json and wrote it back with ConvertTo-Json. With the default settings, the items list inside each order came out as an empty string — the products were gone, and there was no error. Adding -Depth 10 kept everything:
Get-Content data.json -Raw -Encoding UTF8 | ConvertFrom-Json | ConvertTo-Json -Depth 10On the broken file, ConvertFrom-Json in PowerShell 5.1 said only Invalid JSON primitive: . with no line or column, so it is the least helpful way to find an error.
Which way to use
| Way | Install | Indents it | Finds errors | Measured note |
|---|---|---|---|---|
| Edge / Chrome Pretty-print | No | Yes, 2 spaces | No — silent | Broken file: checkbox does nothing |
| JSON Formatter (browser) | No | 2, 4 or tab | Line and column | No network requests while formatting |
| Notepad | No | No | No | Good for one quick edit |
| VS Code | Yes | Shift+Alt+F | Yes | Settings files allow comments |
| python -m json.tool | Python | 4 spaces | Line and column | Add --no-ensure-ascii for Korean |
| PowerShell 5.1 | No | Yes | No position | Use -Depth 10 or nested data is lost |
To just read a file, drag it into the browser. If it will not indent, or a program says the JSON is invalid, paste it into a formatter to get the line and column. If you work with JSON every day, VS Code is worth installing.
FAQ
Q. Is it safe to open a JSON file?
Yes. A .json file is plain text; opening it in Notepad, a browser or a formatter only displays it. It cannot run code by being opened. Be careful about where you paste it if it contains personal data — use a tool that does not upload it.
Q. Why does my JSON file open as one long line?
Programs save JSON without spaces or line breaks because those are only for people. My 1,175-byte test file was a single line; indented by two spaces it was 116 lines and 2,156 bytes. Tick Pretty-print in Edge or Chrome, or press Format in a formatter, to add them back for reading.
Q. How do I make .json files always open in the same app?
Right-click a .json file, choose Open with, then Choose another app, pick the app (for example Microsoft Edge or Notepad) and select Always. After that, double-clicking any .json file opens it there.
Q. Pretty-print does nothing in my browser. Why?
In my test this happened when the file was not valid JSON — one extra comma was enough. The browser gave no error. Paste the file into a JSON formatter, or run python -m json.tool on it, to see the line and column of the problem.
Q. What does 'Expected double-quoted property name' mean?
The parser reached a place where a name in double quotes should start and found something else — most often a comma before a closing brace, or a name written without quotes. The column number points to that spot.
Paste or drop a .json file to indent it, minify it, explore it as a tree, or find the exact line and column of a syntax error. It runs in your browser — the JSON is not sent anywhere.
- ✓ Free
- ✓ No install, no sign-up
- ✓ Runs in your browser
- ✓ Files are never uploaded
🔒 Your file is never sent to a server or anywhere else — it is processed only in your own browser.