How to Open, Edit, and Create JSON Files
A practical guide for opening JSON files in any application — browser, VS Code, Excel, Notepad++, and online tools.
What Is a JSON File?
A JSON file (.json) is a plain-text file that stores data using JavaScript Object Notation — a lightweight format built from key-value pairs and ordered lists. Because it is plain text, any application that reads text files can open it.
{
"name": "Alice",
"age": 30,
"active": true,
"tags": ["developer", "designer"]
}How to Open a JSON File
In VS Code (recommended)
- 1.Install VS Code from code.visualstudio.com
- 2.File → Open File, then select your .json file
- 3.Press Alt+Shift+F (Windows/Linux) or Shift+Option+F (Mac) to auto-format
- 4.Install the "Prettier" extension for format-on-save
In a Browser (Chrome / Firefox)
- 1.Drag the .json file onto any open browser tab
- 2.The file renders as plain or formatted text
- 3.Install a "JSON Viewer" extension for syntax highlighting and collapsible nodes
- 4.Works offline — no internet connection required
In Notepad (Windows)
- 1.Right-click the .json file → Open with → Notepad
- 2.Or open Notepad, then File → Open and select the file
- 3.No syntax highlighting, but works for quick edits
- 4.Use Notepad++ for a better experience with large files
In Notepad++ (Windows)
- 1.File → Open and select your .json file
- 2.Install the "JSON Viewer" plugin via Plugin Manager for folding
- 3.Language → J → JSON for syntax highlighting
- 4.Plugins → JSON Viewer → Format JSON to pretty-print
Online alternative: Use our free JSON Formatter to view and validate any JSON directly in your browser — no install required.
How to Open a JSON File in Excel
Excel does not open JSON directly by double-clicking. You need to use the Power Query import path, which is available in Excel 2016 and Microsoft 365.
- 1
Open Excel and go to the Data tab in the ribbon.
- 2
Click Get Data → From File → From JSON.
- 3
Browse to your .json file and click Import.
- 4
Power Query Editor opens — click "To Table" in the top-left to convert to a table.
- 5
Click the expand icon on the Column1 header to show all fields.
- 6
Click Close & Load to import the data into a worksheet.
Faster alternative: Use our JSON to Excel tool — paste your JSON and download a ready-to-open .xlsx file in seconds. No Power Query steps needed.
How to Edit a JSON File
VS Code is the best editor for JSON — it highlights syntax errors in real time and marks the exact line with the problem. After editing, always validate before saving.
Use double quotes for all keys and string values
Add a comma after every item except the last in an object or array
Validate with our JSON Formatter before saving
Use single quotes — JSON requires double quotes everywhere
Leave trailing commas — standard JSON parsers reject them
Add // comments — JSON has no comment syntax (use a "_comment" key instead)
How to Create a JSON File
Creating a JSON file takes under a minute. Open any text editor, write valid JSON, and save the file with a .json extension.
Single object
{
"name": "Alice",
"age": 30,
"active": true
}Array of objects
[
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]After writing the file, paste it into the JSON Formatter to check for syntax errors before using it in your project.
Open and validate JSON online
Use our free JSON Formatter to view, validate, and pretty-print any JSON file directly in your browser.