How to Open a JSON File
To read a JSON file, right-click it and choose Open with > Notepad on Windows, or use a text editor on Mac or Linux. The viewer below formats and validates JSON and provides a browsable tree. To turn it into spreadsheet columns, use the Excel import or conversion instructions instead.
Choose what you need
Open a JSON File Online
Drop a .json file below. It's validated with a real parser — if something's wrong, you get the exact line and column, not just "invalid JSON". If it's valid, you get a collapsible tree explorer, a syntax-highlighted formatted view, a minified view, and one-click downloads of either.
🔒 Nothing is uploaded — your file never leaves this deviceThis file is very large, so the tree view stops after 5,000 nodes. Use the formatted or minified downloads for the complete data.
On this page
- Open a JSON file online (tool)
- Quick answer
- What is a JSON file?
- Open on Windows
- Open on Mac & Linux
- Open in Firefox, Chrome or Edge
- Open JSON in Excel
- Notepad++ & command line
- Open on iPhone & Android
- Open in a code editor
- Common JSON syntax errors
- Common JSON files & deleting them
- JSON Lines (.jsonl)
- Very large JSON files
- Related file extensions
- Technical references
- FAQ
What is a JSON file?
JSON (JavaScript Object Notation) is a lightweight, text-based format for representing structured data — objects, arrays, strings, numbers, booleans and null — that's readable by both humans and machines. Despite the name, it's language-independent: virtually every programming language can read and write it, which is why it's become the default format for web API responses, configuration files, app settings, and data interchange between completely different systems.
Structurally, a JSON document is just text with a strict grammar defined by the ECMA-404 and RFC 8259 standards: objects are wrapped in { } with "key": value pairs, arrays in [ ], strings must use double quotes, and there's no support for comments, trailing commas, or unquoted keys the way more relaxed formats (like YAML or JavaScript object literals) allow. That strictness is what makes JSON so reliably parseable — and also why a single stray comma can make an entire file fail to load, which is exactly what the validator on this page is built to pinpoint.
How to open a JSON file on Windows
- Right-click the file, choose Open with, then pick Notepad for a plain-text view.
- For a readable, indented view with syntax highlighting, open it in a browser tab instead — Firefox and Edge render .json files with collapsible sections automatically, while Chrome shows the raw text with a Pretty-print option.
- For validation, structure exploration, and formatting, use the tool on this page — nothing installs, and nothing is uploaded.
How to open a JSON file on Mac & Linux
- Mac: Right-click the file, choose Open With, then TextEdit for a plain-text view.
- Linux: Any text editor (gedit, Kate, nano, vim) opens it directly — it's plain text with no special handling required.
- On either platform, dragging the file into a browser tab or the tool on this page gives a far more readable, structured view than a plain text editor.
Open a JSON file in Firefox, Chrome or Edge
Drag the .json file onto an open browser window (or press Ctrl+O / Cmd+O and pick it). What you get depends on the browser:
- Firefox has a full built-in JSON viewer. It opens on a JSON tab with a collapsible tree, plus Raw Data (with a Pretty Print button) and Headers tabs, and toolbar buttons to Save, Copy, Collapse All, Expand All and Filter JSON.
- Microsoft Edge also formats JSON automatically, with syntax colouring and fold arrows next to each object and array.
- Chrome shows the raw text in a monospace font; recent versions add a Pretty-print checkbox at the top that indents it. There is no collapsible tree without an extension — use Firefox or the tool on this page for that.
Open a JSON file in Excel (as a table)
Excel doesn't open .json files with a double-click, but its Power Query importer turns them into rows and columns. In Excel for Microsoft 365, 2021 or 2019 on Windows:
- Go to Data > Get Data > From File > From JSON, pick the file and click Import. The Power Query Editor opens.
- If the file is an array, you'll see a single List column of Record entries. Click To Table on the ribbon, then OK.
- Click the expand button (two opposing arrows) in the column header, tick the fields you want, and untick Use original column name as prefix for cleaner headers.
- Repeat the expand step for any column that still shows Record or List (nested objects and arrays), then click Close & Load.
Excel for Mac's Get Data options vary by version; if From JSON isn't offered, or you just want a quick flat file, run the data through the JSON to CSV converter and open the CSV instead (see how to open a CSV in Excel without losing leading zeros). Google Sheets has no built-in JSON import.
Pretty-print JSON in Notepad++ or the command line
Notepad++ highlights JSON but doesn't reformat it out of the box. Install a plugin from Plugins > Plugins Admin: search for JSON Viewer (adds a tree panel and a Format JSON command) or JSTool (adds JSFormat and JSMin), tick it and click Install. Both then appear under the Plugins menu.
Terminal: Python is preinstalled on most Mac and Linux systems and includes a formatter that also validates the file. jq (a free download, also available through Homebrew and most Linux package managers) does the same and can extract fields:
On Windows, the same commands work in PowerShell once Python is installed (use py -m json.tool file.json), or use PowerShell's own Get-Content file.json -Raw | ConvertFrom-Json to load it as objects.
Open a JSON file on iPhone or Android
Phones treat .json as a generic document, so tapping one often shows only an icon or offers a list of unrelated apps.
- Quickest on either platform: open this page in Safari or Chrome, tap Click to choose a file, and pick the JSON from Files or Downloads. It validates it and shows the tree view; nothing is uploaded.
- iPhone/iPad: in the Files app, long-press the file and use Quick Look; if that doesn't show the text, tap Share and send it to a text-editor or JSON-viewer app from the App Store.
- Android: install any text editor or JSON viewer app from Google Play, then use Open with from your file manager or the Downloads list.
Open a JSON file in a code editor
Code editors like VS Code, Sublime Text, and Notepad++ all recognize the .json extension automatically and apply syntax highlighting, bracket matching, and often inline error markers for invalid syntax — making them the best choice if you'll be editing the file rather than just viewing it. VS Code in particular includes a built-in "Format Document" command (right-click > Format Document, or Shift+Alt+F) that re-indents a minified JSON file into a readable structure, similar to what the "Formatted" tab on this page's tool produces.
Common JSON syntax errors and how to fix them
"Unexpected token" or "Expected property name" errors
Almost always a trailing comma — a comma left after the last item in an object or array, like {"a": 1, "b": 2,}. JSON doesn't allow trailing commas at all, unlike JavaScript object literals where it's harmless. Remove the comma right before the closing } or ].
"Unexpected token" pointing at a key without quotes
JSON requires every key to be wrapped in double quotes: {"name": "value"}, not {name: "value"}. Single quotes around keys or values are also invalid — only double quotes are allowed.
"Unexpected end of JSON input"
The file is truncated or incomplete — usually a missing closing } or ] somewhere, often because the file got cut off mid-download or mid-save. Compare the number of opening and closing brackets, or use the tool above, which will point to exactly where parsing ran out of content.
A value that looks like a number or boolean but is quoted, or vice versa
JSON is type-strict: "true" (a string) and true (a boolean) are different values, and code reading the file may fail or behave unexpectedly if it expects one and gets the other. This won't cause a parse error, but it's a very common source of "valid JSON, wrong result" bugs.
JSON files you might come across (and whether you can delete them)
- Data downloads from online services: Google Takeout, and the "Download your information" exports from Facebook and Instagram, can deliver your data as JSON. Instagram and Facebook let you choose HTML or JSON when you request the download; pick HTML if you just want to read it in a browser, JSON if you want to import it into another tool. Tip: these exports sometimes store accented letters and emoji as escaped byte sequences (for example
\u00c3\u00a9instead of é), which is how the service wrote them, not damage. - App and program settings: files like
settings.json,config.jsonormanifest.jsoninside a program, game or browser-extension folder hold configuration. Editing them by hand can break the program; deleting them usually resets the settings or stops it starting. Make a copy before you change anything. - Developer project files:
package.json(Node.js),composer.json(PHP),tsconfig.jsonand similar describe a software project. Don't delete them from a project you're working with. - Downloads saved as .json by mistake: a web form or API may hand you a .json file when you expected a spreadsheet or PDF. Open it in the tool above to see what it contains; tabular data can go straight to the JSON to CSV converter.
JSON Lines (.jsonl / .ndjson) files
A .jsonl or .ndjson file (JSON Lines / newline-delimited JSON) holds one complete JSON object per line, with no surrounding [ ] and no commas between records. It's common for logs, analytics exports and machine-learning datasets because programs can append to it and read it one line at a time.
The file as a whole is not a single valid JSON document, so a normal JSON parser stops where the second line starts — in Chrome-based tools the message is typically "Unexpected non-whitespace character after JSON". The JSON validator on this page works the same way, so check a single line by pasting it into a new file. To work with the whole file:
jq . data.jsonlpretty-prints every record;jq -s . data.jsonl > data.jsonwraps them into one standard JSON array.- In Python:
pandas.read_json("data.jsonl", lines=True)loads it straight into a table. - Any text editor opens it; each line is one record.
Opening a very large JSON file
Because a JSON file is usually a single structure, most viewers parse the entire file into memory before showing anything. A multi-hundred-megabyte file can make Notepad, a browser tab or an online viewer freeze. What works better:
- VS Code opens large files but switches off syntax highlighting, folding and other features above a size threshold to stay responsive; it's still fine for searching.
- Look at just part of it with
head -c 2000 big.json(Mac/Linux) orGet-Content big.json -TotalCount 50(PowerShell). - Stream it:
jq -c '.[]' big.json | headprints the first records of a top-level array; for files too big for memory, jq's--streammode or Python'sijsonlibrary read it piece by piece. - Load it into a database: DuckDB can query JSON and JSON Lines files directly with SQL.
The tool on this page also reads the whole file into your browser's memory, so it's ideal for files up to tens of megabytes; beyond that, use one of the options above.
Technical references
JSON's grammar is formally standardized by Ecma International as ECMA-404, a short and freely available document.
- ECMA-404 — The JSON Data Interchange Syntax — The official international standard defining JSON's exact grammar.
Frequently asked questions
What program opens a .json file?
A .json file is plain text, so any text editor (Notepad, TextEdit, VS Code, Sublime Text) opens it. For readability, a dedicated JSON viewer — like the tool on this page, or a code editor with JSON syntax highlighting — makes nested data much easier to follow than a plain text editor does.
Why does my JSON file show an error when I try to use it?
JSON has strict syntax rules: property names must be in double quotes, trailing commas after the last item in an object or array aren't allowed, and single quotes or unquoted keys aren't valid JSON even though they're common in JavaScript. The tool on this page points to the exact line and column where parsing failed, which is usually one of these issues.
Can I edit a JSON file with a regular text editor?
Yes — since JSON is plain text, any text editor can edit it. Just be careful to keep the syntax valid (matching brackets and quotes, no trailing commas); a code editor with JSON support will flag mistakes as you type, which a plain text editor won't.
What's the difference between JSON and a JavaScript object?
JSON is a text-based data format with stricter rules than JavaScript's own object syntax: JSON requires double-quoted keys and strings, doesn't allow trailing commas, functions, comments, or the value "undefined", and every JSON document is valid to parse as a JavaScript value — but not every JavaScript object literal is valid JSON.
How do I open a JSON file in Excel?
In Excel for Windows, use Data > Get Data > From File > From JSON. In the Power Query Editor, click To Table, then the expand button in the column header to turn the fields into columns, and click Close & Load. If your version doesn't offer From JSON, convert the file to CSV first and open that.
Why does my JSON file open in Chrome as one long line of text?
Chrome shows JSON as raw text rather than a formatted tree; recent versions offer a Pretty-print checkbox that indents it. Firefox and Edge format JSON automatically, and the tool on this page shows it as a collapsible tree.
What is a .jsonl file and how do I open it?
A .jsonl (JSON Lines) file contains one JSON object per line instead of one big document. Any text editor opens it. Standard JSON validators report an error at the start of the second line because the file as a whole isn't a single JSON value; tools such as jq or pandas.read_json with lines=True read it correctly.
How do I open a JSON file that is too big for Notepad or my browser?
Use a tool that doesn't need to display the whole file at once: view the first part with head or PowerShell's Get-Content -TotalCount, stream records with jq, or query the file with DuckDB or Python's ijson library. VS Code can open large files but disables highlighting and folding to stay responsive.
Can I delete a .json file?
It depends on where it is. JSON files in a program, game or project folder are usually settings or configuration, and deleting them can reset or break that software. A JSON file you downloaded yourself, such as a data export, can be deleted like any other document once you no longer need it.
Last updated October 1, 2026.