What Is a .JSON File?

A .json file is a plain text data file in JavaScript Object Notation, a lightweight format of names, values, lists and nested objects. It is the standard way web APIs exchange data and a common format for app settings, exports and configuration. Any text editor opens JSON, and browsers can display it nicely.

Extension
.json
Full name
JavaScript Object Notation
Type
Code and web file
MIME type
application/json
Developed by
Douglas Crockford (standardized as ECMA-404 and RFC 8259)

About JSON files

JSON is built from a few pieces: objects in curly braces with "name": value pairs, arrays in square brackets, strings in double quotes, numbers, true, false and null. It is easy for both humans and programs to read, which is why nearly every programming language can parse it and why data exports from Google Takeout, Twitter, Discord and many other services come as JSON.

The syntax is strict. Trailing commas, single quotes and comments are not allowed in standard JSON, and one missing bracket makes the whole file unreadable to a parser. Variants such as JSONC (JSON with comments, used by VS Code settings) and JSON Lines (.jsonl, one object per line) relax or adapt the rules for specific tools.

JSON files are usually small, but data exports can run to hundreds of megabytes, which can freeze a basic text editor. For those, use VS Code, a command-line tool like jq, or import the data into a spreadsheet or database. JSON itself is inert data and cannot run code when opened.

What JSON files are used for

  • Web API requests and responses
  • App and project configuration (package.json, tsconfig.json, settings.json)
  • Personal data exports from online services
  • Storing structured data for websites, games and scripts

How to open a .json file

Windows

Right-click > Open with > Notepad for a quick look, or open it in VS Code for colour-coding and formatting.

Mac

Open it in TextEdit or VS Code; press space in Finder for a Quick Look preview of the raw text.

Online / any browser

Drag the file into Firefox, which shows a collapsible JSON viewer; Chrome and Edge display the raw text.

Android

Any text editor app can open it; Files by Google may offer to open it as text.

How to convert a .json file

To turn a JSON list into a spreadsheet, use Excel's Data > Get Data > From File > From JSON, then load the table and save as .xlsx or .csv.

To pretty-print or validate, open the file in VS Code and run Format Document, or use jq on Mac and Linux.

Renaming .json to .csv does not convert it; the structure is different and needs an import or conversion tool.

Changing the extension in the file name does not convert the file. See how to change a file extension for when renaming is safe.

Naming and renaming JSON files

  • Do not rename configuration files such as package.json or tsconfig.json; tools look for those exact names.
  • For data exports, include the source and date (orders-export-2025-10-01.json) because the content gives few visual clues.
  • Use .jsonl or .ndjson for one-object-per-line data so tools do not try to parse the whole file as a single JSON document.

Renaming lots of .json files? See how to rename json files with ai, use the free online bulk renamer for patterns and numbering, or try File Renamer AI to name each file from what is inside it.

Related file types

Frequently Asked Questions

How do I open a JSON file?

Use any text editor such as Notepad, TextEdit or VS Code. Firefox also shows JSON as a collapsible tree.

How do I convert JSON to Excel?

In Excel choose Data > Get Data > From File > From JSON, shape the data in Power Query, and load it to a sheet.

Can a JSON file contain a virus?

JSON is plain data and does not execute when opened. The risk only arises if a program processes untrusted JSON insecurely.

More code and web file extensions · all file extensions