What a JSON file is and why you might encounter one

A JSON file is a text file that stores data in a structured format — think of it as a way to organize information so that both humans and programs can read it. JSON stands for JavaScript Object Notation, but you don't need to know JavaScript to open one. The file ends in .json instead of .txt or .docx.

You might encounter JSON files when you export data from a website, download settings from an app, or receive structured information from a service. A weather app might store your saved locations in JSON. A backup of your browser bookmarks might be a JSON file. If someone sends you data and it ends in .json, this guide will show you how to look inside it.

The good news: you almost certainly already have the tools to open one. You don't need special software or to install anything.

Key Takeaways

  • JSON files are plain text and open in any text editor — Notepad on Windows, TextEdit on Mac, or any editor you already use.
  • The structure uses curly braces {} for objects and square brackets [] for lists, with data organized as pairs like "name": "value".
  • If a JSON file is too large or messy to read in a text editor, a JSON viewer tool in your web browser can format it automatically.
  • You can copy JSON data into a spreadsheet program like Excel or Google Sheets if you want to work with it as a table.

Opening a JSON file in a text editor

The simplest way to read a JSON file is to open it the same way you would open any text file. Right-click the file and choose "Open with" (on Windows) or "Open With" (on Mac), then select a text editor.

On Windows, Notepad is built in — it's the most basic option and works fine for small files. On Mac, TextEdit is built in, but you need to go to Format menu and choose "Make Plain Text" before opening the JSON file, otherwise it may add formatting. If you use a code editor like Visual Studio Code (free, from Microsoft), Sublime Text, or Atom, those are even better because they color-code the structure and make it easier to spot where data begins and ends.

When you open the file, you'll see text that looks like this:

{ "name": "Sarah", "age": 28, "city": "Portland", "hobbies": ["reading", "hiking", "cooking"] }

Each piece of information is labeled (like "name" or "age"), followed by a colon, then the actual value. Strings of text go in quotes. Numbers don't. Lists go in square brackets with items separated by commas.

Understanding JSON structure so you can find what you need

JSON uses a few simple rules. Curly braces {} hold a single object — a collection of labeled data. Square brackets [] hold a list of items. A colon separates the label from the value. Commas separate items from each other.

If you're looking for a specific piece of information, scan for the label in quotes. If you see "email": "sarah@example.com", you've found the email. If you see "addresses": [{"street": "123 Main", "city": "Portland"}], that's a list containing one address object with its own labels inside.

The structure can get nested — objects inside objects, lists inside objects, objects inside lists. The indentation (the spacing at the start of each line) helps show what belongs to what, but it's just for readability. The file works the same whether it's indented or crammed into one line.

Using an online JSON viewer when the file is hard to read

If you open a JSON file and it's all on one line, or it's so large that scrolling through it is painful, an online JSON viewer can reformat it automatically. These are free web tools — you don't install anything.

Go to jsoncrack.com, jsonformatter.org, or json.parser.online.fr in your web browser. Copy the contents of your JSON file (open it in a text editor, select all with Ctrl+A or Cmd+A, then Ctrl+C or Cmd+C to copy). Paste it into the viewer's text box. The tool will instantly reformat it with proper indentation and color-coding, and often shows you a tree view on the left side so you can click to jump to different sections.

These tools work in your browser and don't send your data anywhere if you use them offline, but if you're handling sensitive information, you may prefer to format it locally using a text editor with JSON support instead.

Moving JSON data into a spreadsheet

If the JSON file contains a simple list of objects — like a list of people, each with a name and email — you can move it into Excel or Google Sheets to work with it as a table.

The process depends on the structure. If your JSON is a list of objects like [{"name": "Sarah", "email": "sarah@example.com"}, {"name": "Tom", "email": "tom@example.com"}], some spreadsheet programs can import it directly. In Google Sheets, go to File > Import, choose "Upload", select your JSON file, then choose "Replace spreadsheet" or "Insert new sheet". Google Sheets will attempt to convert it to columns and rows.

If that doesn't work, or if your JSON structure is more complex, you can use a conversion tool. Websites like convertcsv.com have a JSON to CSV converter — paste your JSON, download the CSV file, then open that CSV in Excel or Sheets. CSV is the spreadsheet format, and it's much easier to work with than JSON if you need to sort, filter, or edit the data.

Checking if a JSON file is valid

If you edited a JSON file or received one that might be corrupted, you can check whether it's valid — meaning it follows all the rules and a program can actually read it. Paste it into jsonlint.com or use the viewer tools mentioned above; they'll tell you if there's a problem and where it is.

Common mistakes are missing commas between items, mismatched quotes, or a curly brace that didn't get closed. If the tool points out an error, look at the line number it gives you and check that line in your text editor. Usually it's a single character out of place.

When you need to edit a JSON file

If you need to change values inside a JSON file, open it in a text editor and edit it the same way you'd edit any text document. Change "Sarah" to "Sam", or change a number, or add a new line following the same format as the ones around it.

The key is to keep the structure intact: every opening brace needs a closing brace, every opening bracket needs a closing bracket, and every label needs a colon and a value. After you save, paste the file into a JSON validator to make sure you didn't accidentally break the format.

If you're not comfortable editing by hand, use a JSON editor tool online — some let you edit the data in a form-like interface instead of typing the raw text. Jsoncrack.com has an edit mode where you can click fields and change values without worrying about syntax.

Frequently Asked Questions

Can I open a JSON file in Microsoft Word or Google Docs?

Technically yes, but you shouldn't. Word and Docs are designed for formatted documents, not plain text, and they may add invisible formatting that breaks the file. Stick to a text editor like Notepad, TextEdit, or a code editor. If you want to read it in a more user-friendly way, use an online JSON viewer instead.

What if the JSON file won't open in my text editor?

The file might be corrupted, or your text editor might not support large files. Try a different editor — Visual Studio Code handles very large JSON files better than Notepad. If it still won't open, the file may be damaged. Try opening it with an online JSON viewer; if that fails too, the file itself has a problem and may not be recoverable.

Is it safe to paste my JSON into an online tool?

It depends on what's in it. If the JSON contains passwords, API keys, or personal information you don't want to send over the internet, use a local tool instead — a text editor on your computer, or a downloadable JSON viewer that runs offline. For non-sensitive data, online viewers are convenient and generally safe, but you're always in control of whether to use them.

Can I convert JSON to other formats besides CSV?

Yes. Websites like convertcsv.com and online conversion tools support JSON to Excel, JSON to XML, JSON to YAML, and other formats. The conversion works best if your JSON has a simple, consistent structure. Complex nested data may not convert cleanly, and you might need to manually reorganize it afterward.