Sonnet

What is a JSON file?

You downloaded your data from an app, a game asked you to replace a settings file, or someone sent you something called export.json. Here’s what that file is, in plain English, and how to look inside it.

Short answer

A JSON file (.json) is a plain text file that stores data as names and values, like "name": "Ava", grouped into objects and lists. Apps and websites use it to save settings, exchange data and hand you exports of your account. It isn’t a program and can’t run anything, so opening it is safe, though it may contain private data. To read it comfortably, open it in a JSON viewer. Any text editor also works.

Get Sonnet free A JSON viewer for Android, offline.

What a JSON file looks like

JSON stands for JavaScript Object Notation. It started in web development and is now used almost everywhere. A small example:

{
    "name": "Ava Thompson",
    "age": 34,
    "premium": true,
    "languages": ["English", "Portuguese"],
    "address": {
        "city": "Lisbon",
        "country": "PT"
    },
    "lastOrder": null
}

Read it line by line: this person’s name is Ava Thompson, age 34, has premium, speaks two languages, lives in Lisbon, and has no last order. Every JSON file is built from the same six kinds of value:

Objects and lists can sit inside each other as deeply as needed. That nesting is why a large JSON file is hard to read as raw text, and why JSON viewers show it as a tree you can fold and unfold.

Where JSON files come from

Is it safe to open a JSON file?

Opening one, yes. A JSON file is just text. It contains no code that runs when you view it, the same way reading a .txt file can’t install anything. Two sensible cautions:

How to open a JSON file

On Android

Android has no built-in app for JSON. Install a JSON viewer, then tap the file and choose it under Open with. Our app, Sonnet, shows the file as a foldable tree, lets you edit values, and works offline. For other options, see how to open a JSON file on Android. For chat and email attachments, see this guide.

On Windows

Right-click → Open withNotepad shows the text. Most web browsers also display a JSON file you drag into them, and Firefox formats it as a collapsible tree.

On a Mac

Open it with TextEdit, or drag it into a browser window.

JSON compared with similar formats

FormatLooks likeBest for
JSON .jsonNested names and valuesStructured data with groups and lists
CSV .csvRows and columns separated by commasFlat tables; opens in any spreadsheet
XML .xmlTags like <name>Ava</name>Older systems and documents; more verbose
JSON Lines .jsonlOne JSON object per lineLogs and very large exports
JSONCJSON plus // commentsConfig files for developer tools

JSON Lines and JSONC look almost identical to JSON, but strict JSON tools reject them. If a file “looks like JSON” and still won’t open, that’s a likely reason. See Invalid JSON: what the error means.

See inside any JSON file

Sonnet opens JSON files on Android as a clean, collapsible tree, and lets you edit them with a tap. Offline, no ads, no account. Free on Google Play.

Get it on Google Play