JSON Viewer & Formatter Online

Open a JSON file or paste JSON to see it as a collapsible tree, highlighted code or a sortable table. Validate it with exact error lines, fix it in one click, query it with JSONPath and export to CSV, Excel, YAML or XML - all in your browser. Working with other data? Try the XML Viewer, YAML Viewer, CSV Viewer or the Plist Viewer for Apple .plist files.

or paste JSON
Ctrl + Enter to view · Ctrl + V anywhere
Try a sample
Tree, code, table Auto-fix Big files No upload

How to view a JSON file online

  1. Open your JSON. Drop a .json, .jsonl or .geojson file anywhere on the page, browse for it, paste JSON text, or try a sample.
  2. Explore it. Browse the collapsible tree, read the highlighted code, or see lists as a sortable table. Search keys and values, or run a JSONPath query.
  3. Fix or compare. Broken JSON shows the exact line and column - press Auto-fix or edit it. Compare two versions to see what changed.
  4. Copy or export. Copy a value or its path, download the JSON formatted or minified, or export it to CSV, Excel, YAML, XML or JSON Lines.

Shortcuts: Ctrl + F search, Enter / Shift + Enter next and previous match, Ctrl + S download, arrow keys move through the tree.

What is a JSON file?

JSON (JavaScript Object Notation) is a plain-text format for structured data.

It is the everyday language of web APIs, and it also stores settings, app data and exports.

A JSON file holds one value - usually an object in { } with named keys, or an array in [ ] with a list of items. Values can be text in double quotes, numbers, true, false, null, or more objects and arrays.

The format is defined by RFC 8259 and ECMA-404. Files end in .json and are served as application/json; close relatives are JSON Lines (.jsonl), GeoJSON for maps, and files like package.json or manifest.json.

How to open a JSON file on Windows, Mac, iPhone and Android

Any device with a web browser can open JSON on this page - no app needed.

Windows

Right-click the file, choose Open with and pick Notepad to see the raw text. For a readable tree, drag the file onto this page in Edge, Chrome or Firefox.

Mac

Select the file and press Space for a Quick Look preview, or open it with TextEdit. To browse it as a tree, open this page in Safari or Chrome and drop the file in.

iPhone and iPad

Open this page in Safari, tap browse and pick the file in the Files app. A JSON attachment from Mail or Messages can be saved to Files first.

Android

Open this page in Chrome, tap browse and choose the file from Downloads or your file manager. It opens right here - nothing is uploaded.

Linux and the command line

Any modern browser works on Linux and Chromebooks too. In a terminal, python3 -m json.tool file.json or jq . file.json pretty-prints a file.

How to convert JSON to CSV, Excel, XML or YAML

Open the JSON, press Export and pick a format.

CSV and Excel use the table: any list of objects becomes rows, and nested objects are flattened into columns like address.city.

YAML and XML convert the whole document, keeping the nesting. Check the result in the YAML Viewer or XML Viewer, and open spreadsheets in the Excel Viewer.

Going the other way? The CSV Viewer, Excel Viewer, YAML Viewer and XML Viewer can all export JSON. Lists can also be saved as JSON Lines, one record per line, for logs and data pipelines.

Why won't my JSON open? Common errors and fixes

Most broken JSON comes from a handful of small mistakes.

The viewer points to the exact line and column, and Auto-fix repairs most of them:

MistakeBrokenValid JSON
Trailing comma[1, 2, 3,][1, 2, 3]
Single or smart quotes{'a': 'b'}{"a": "b"}
Unquoted keys{name: "x"}{"name": "x"}
Comments// noteremoved
Missing comma{"a": 1 "b": 2}{"a": 1, "b": 2}
NaN or Infinity{"x": NaN}{"x": null}
Python valuesTrue, Nonetrue, null
Single backslash"C:\data""C:\\data"
Missing bracket[{"a": 1}[{"a": 1}]

A hidden byte order mark (BOM) at the start trips up many parsers - this viewer removes it for you. Several objects one after another are not one JSON document, but they open fine as JSON Lines when each sits on its own line.

If the viewer says the file is binary, it is not text at all - often a ZIP, image or database with a .json name. It tells you what the file really is, so you can open it in the right tool from our file viewers.

Numbers longer than about 15 digits (some IDs) lose precision in JavaScript. The viewer warns you when that happens - store such IDs as strings.

JSON vs XML vs YAML vs CSV

All four store data as plain text, but they suit different jobs.

JSONXMLYAMLCSV
Best forAPIs, web apps, settingsDocuments, feeds, office filesConfig files, CI, KubernetesSpreadsheets, data exports
NestingYesYesYesNo - flat rows
Value typesText, number, true/false, nullText only (types via a schema)Text, number, true/false, nullText only
CommentsNoYesYes (#)No
SizeCompactVerboseCompactSmallest
Open it inThis viewerXML ViewerYAML ViewerCSV Viewer

What else the viewer can do

  • JSONPath. Click any row to see and copy its path, like $.products[0].price, or run queries with filters in the Query tab.
  • Table view. Lists of objects become sortable columns - search filters the rows as you type.
  • Format or minify. 2 or 4 spaces, tabs or one line, with keys sorted A-Z if you like.
  • Compare. See exactly what was added, removed or changed between two versions, ignoring key order and spacing.
  • Colours and links. Hex colours get a swatch and URLs are clickable - handy for theme files. Pick exact colours with the Image Color Picker.
  • Plain text too. Not sure it is JSON? The TXT Viewer opens any text file, and the JS Viewer handles JavaScript.

Frequently Asked Questions

Drop the .json file onto this page, click browse, or paste the JSON text. It opens at once as a collapsible tree, and you can switch to highlighted code or a table.

It works on Windows, Mac, iPhone, Android and Chromebooks with nothing to install.

Open the JSON and switch to Code view - it is pretty-printed with 2 spaces and colour highlighting.

Under Options you can pick 4 spaces, tabs or minified, and sort keys A-Z. Copy the result or download it as a .json file.

Every file is validated as it opens. If something is wrong you get the exact line and column, a short explanation and the broken line with a marker.

Press Auto-fix to repair trailing commas, single quotes, comments, unquoted keys, NaN and Python values, or Show in editor to fix it by hand.

Open the JSON, press Export and choose CSV or Excel (XLSX). Any list of objects becomes rows and columns, and nested objects are flattened into columns like address.city.

Preview it first in Table view, then check the file in the CSV Viewer or Excel Viewer.

Yes. The file is read and checked in a background worker, and the tree, code and table only draw the rows on your screen, so files of 100 MB and more stay smooth.

The real limit is your device memory - very large files need a desktop browser.

JSONPath is a query language for JSON, like XPath for XML. Open the Query tab and type an expression such as $.products[*].name or $..[?(@.price > 10)] to list every match with its path.

Clicking any row in the tree also shows and copies its path.

Yes. A .jsonl or .ndjson file with one JSON value per line opens as one list you can browse, query and export.

GeoJSON, HAR, package.json, .webmanifest and source map files are plain JSON and open as they are.

No. The JSON is read and shown by your own browser and never leaves your device, so it is safe for API responses, tokens, config files and customer data.

Recent files are only remembered if you switch that option on, and only in this browser.

Guides & Tutorials

All 14 guides
Guide How to Tell What Format an Image File Is (5 Easy Ways) Read the guide Guide How to Open ZIP, RAR, 7Z & TAR.GZ Files Online (Without Installing Anything) Read the guide Comparison PNG vs JPG: Which Image Format Should You Actually Use? Read the guide