.JSON file extension

To open .JSON files on Windows, right-click the .json file → Open with → choose a text/code editor (for example, Visual Studio Code).

To open a .json file, use a text/code editor (for reading and editing) or a JSON viewer/formatter (for easier reading). On most systems, Visual Studio Code can open .json files and provides JSON-specific editing help like validation and formatting.

Last updated: June 11, 2026 · Reviewed by Julian Stricker

What “reviewed” means on this page
  • Format fit: whether the “what is this file?” description matches common real-world use of the extension, including category, typical MIME types, and aliases.
  • Opening paths: whether Windows / macOS / Linux steps read plausibly for current OS dialogs and default apps; we remove fantasy menus and unsafe shortcuts.
  • Security framing: whether risk notes match the extension class (for example executables vs plain data) and whether affiliate wording does not contradict the security section.
  • Sources and further reading: whether external links point to vendors, standards bodies, or other primary references where possible; we avoid inventing details we cannot ground.
  • Limits: this is clarity and safety-messaging QA, not a guarantee that every statement is exhaustive or that every binary you download is harmless.

Full methodology in the Imprint The Imprint also states where AI is used and what that does—and does not—replace.

Open on your device

Choose your operating system for a dedicated step-by-step opening guide.

How to open .JSON files

Use these platform-specific instructions to open .JSON files safely.

Windows

  1. Right-click the .json file → Open with → choose a text/code editor (for example, Visual Studio Code).
  2. If it looks unreadable (one long line), use your editor’s “Format Document” / JSON formatting feature.
  3. If an app refuses to open it, open the editor first, then use File → Open and select the .json file.
Full Windows guide

Mac

  1. Right-click the .json file → Open With → choose a code/text editor (for example, Visual Studio Code).
  2. If opening in TextEdit, set it to plain text (not rich text) so the JSON isn’t altered.
  3. Use your editor’s JSON formatting/pretty-print option if it’s minified.
Full Mac guide

Linux

  1. Open the .json file in a text editor (any plain-text editor works) or a code editor that supports JSON features.
  2. To validate and pretty-print from the terminal (if installed), run: jq . file.json
  3. If the desktop doesn’t recognize the file type, it may rely on shared-mime-info mappings; still, any text editor can open it as plain text.
Full Linux guide

iOS

  1. Open the file from the Files app and use a text/code editor app that can edit plain text; if preview is limited, transfer to a desktop editor for full formatting and validation.
Full iOS guide

Android

  1. Open the file with a text/code editor app; if it’s hard to read, use a JSON formatter/viewer app to pretty-print it.
Full Android guide

Security notes

  • Treat JSON from untrusted sources as untrusted input: validate the structure (and ideally against a schema) before using it in production systems.
  • Avoid feeding extremely large or deeply nested JSON into parsers without limits; some parsers can run out of memory or hit recursion/stack limits (a practical denial-of-service risk).
  • Do not “execute” JSON as code. JSON is data, not JavaScript; ensure your tooling uses a proper JSON parser (as specified in RFC 8259) rather than evaluating it as script.

If you did not expect this file

This extension is usually plain data, text, or structured content—not a program by itself. The practical risk is social engineering (a scam attachment or misleading filename). For trusted senders you rarely need heavy-handed antivirus wording; use these tools when you want an extra check on unexpected downloads.

We may earn a commission when you use affiliate links. This supports our free file extension guides.

Can't open this file?

These are the most common causes and fixes when .JSON files fail to open.

Common reasons

  • “Unexpected token” / JSON parse error
  • File opens but is one long line (minified JSON)
  • App says the file type is unknown or opens in the wrong program
  • Encoding or character issues (garbled text)

Fix steps

  1. Check for trailing commas and ensure all property names and string values use double quotes.
  2. Validate with a JSON-aware editor (for example, VS Code JSON features) or a validator tool.
  3. If you control the source, regenerate/export the JSON again to avoid manual syntax mistakes.

What is a .JSON file?

JSON is a lightweight, text-based, language-independent data interchange format defined by standards such as RFC 8259 and ECMA-404. A JSON document is typically built from objects (key/value pairs) and arrays, with strict syntax rules (for example, strings use double quotes). The official media type for JSON is application/json.

Background

JSON is widely used to represent and transmit structured data because it is human-readable, compact, and easy for software to parse. It is especially common in web development, where APIs often send and receive JSON payloads, and in applications that store settings or configuration in JSON files.

The format is standardized (ECMA-404) and also specified as an Internet standard for data interchange (RFC 8259). This standardization is why JSON files are broadly compatible across programming languages and operating systems.

In practical use, .json files are edited with plain-text tools, but JSON-aware editors can provide syntax highlighting, schema-based validation, and automatic formatting. Linux desktop environments commonly rely on shared MIME databases (such as shared-mime-info) to recognize file types like JSON.

Common MIME types: application/json, text/json

Known aliases: .jsn

Further reading

Authoritative resources for more details on the .JSON format.

Common .JSON issues

“Unexpected token” / JSON parse error

JSON syntax is strict: missing quotes, trailing commas, or invalid characters will break parsing.

  1. Check for trailing commas and ensure all property names and string values use double quotes.
  2. Validate with a JSON-aware editor (for example, VS Code JSON features) or a validator tool.
  3. If you control the source, regenerate/export the JSON again to avoid manual syntax mistakes.

File opens but is one long line (minified JSON)

Many systems store JSON without whitespace to reduce size, making it difficult to read manually.

  1. Use your editor’s JSON formatter/pretty-print feature (VS Code supports JSON editing and formatting for .json files).
  2. On Linux, pretty-print in the terminal with: jq . file.json (if jq is installed).

App says the file type is unknown or opens in the wrong program

File associations vary by system and can be changed; MIME/type recognition can also differ across environments.

  1. Use “Open with” to choose a text/code editor and set it as the default for .json if desired.
  2. If the file was renamed, confirm it truly contains JSON text (it should start with { or [ in most cases).

Encoding or character issues (garbled text)

JSON is text, but problems can occur if a tool saves it with an unexpected encoding or adds a byte order mark (BOM) that some parsers reject.

  1. Re-save the file as plain text using UTF-8 in a code editor.
  2. If a parser fails, try removing any leading invisible characters by copying the content into a new file and saving as UTF-8.

FAQ

What is the correct MIME type for .json files?

The official media type is application/json (registered with IANA and specified by RFC 8259).

Can JSON include comments?

No. Standard JSON does not support comments; adding them often causes parse errors in strict parsers.

How do I pretty-print or format JSON?

Use a JSON-aware editor’s formatter (for example, Visual Studio Code’s JSON features) or command-line tools such as jq on Linux if installed.

Is JSON the same as JavaScript?

No. JSON is a separate, language-independent data format with stricter rules than JavaScript object literals (for example, JSON requires double-quoted strings).

Similar file extensions

Compare related formats in the same category to find the right tool faster.