How to open .JSON files on Windows
To open .JSON files on Windows, right-click the .json file → Open with → choose a text/code editor (for example, Visual Studio Code).
Step-by-step instructions
- Right-click the .json file → Open with → choose a text/code editor (for example, Visual Studio Code).
- If it looks unreadable (one long line), use your editor’s “Format Document” / JSON formatting feature.
- If an app refuses to open it, open the editor first, then use File → Open and select the .json file.
Common issues
“Unexpected token” / JSON parse error
JSON syntax is strict: missing quotes, trailing commas, or invalid characters will break parsing.
- Check for trailing commas and ensure all property names and string values use double quotes.
- Validate with a JSON-aware editor (for example, VS Code JSON features) or a validator tool.
- 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.
- Use your editor’s JSON formatter/pretty-print feature (VS Code supports JSON editing and formatting for .json files).
- 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.
- Use “Open with” to choose a text/code editor and set it as the default for .json if desired.
- 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.
- Re-save the file as plain text using UTF-8 in a code editor.
- If a parser fails, try removing any leading invisible characters by copying the content into a new file and saving as UTF-8.
Security note
Treat JSON from untrusted sources as untrusted input: validate the structure (and ideally against a schema) before using it in production systems.