Skip to content

Open files

JSON Digger opens JSON, NDJSON, and plain text files of any size, and .gz and .zst archives that contain them. Each file opens in its own tab. To open JSON that is not in a file, see Paste or fetch JSON.

JSON Digger reads a file in one of three formats. The format decides which views and features are available; the status bar shows it as JSON, NDJSON, or Plaintext.

Extension Format
.json JSON
.ndjson, .jsonl, .jsonlines NDJSON
.txt, .log Plaintext

A file with another extension, or none, is read by its content: lines that each start with { make NDJSON, text that starts with { or [ makes JSON, and anything else is plain text.

The extension always wins over the content, and there is no way to choose a format by hand:

  • A .txt or .log file that contains JSON opens as plain text.
  • An NDJSON file named .json is read as one JSON document, so it shows as malformed JSON after its first line. Rename it to .ndjson to open it as records.
  • A .geojson file opens as JSON, and a .csv or .yaml file opens as plain text.

Ctrl+O opens a file, as do File → Open File… and Open File on the welcome screen or in the command bar. The dialog opens one file at a time; its filter list offers JSON, Compressed JSON, Text, and All.

The file opens in a new tab in the Tree view, or the Text view for plain text. A large file shows its first content at once and finishes indexing in the background; see How large files open.

If the file is already open, JSON Digger reloads it in its existing tab instead of opening a second one. A tab with unsaved edits is left as it is.

Drop one or more files anywhere on the window to open them. Several files open one after the other, each in its own tab.

When every dropped file is JSON, or every one is NDJSON, JSON Digger asks first: Open as tabs opens them as usual, and Merge… combines them into one document. See Merge files. A drop that mixes formats opens tabs without asking.

The welcome screen lists the last 10 files and URLs you opened under Recent files, newest first. Click an entry to open it again. Each row shows the file’s format, size, and when you last opened it.

To empty the list, open Preferences → General and select Clear list next to Recent files. Clearing the list also deletes the credentials saved for fetched URLs in it.

The installer associates .json, .ndjson, and .jsonl files with JSON Digger. Double-click such a file if JSON Digger is your default app for it, or right-click it and choose Open with → JSON Digger.

When JSON Digger is already running, the file opens as a new tab in the running window, and the window comes to the front.

Pass one or more file paths when you start JSON Digger, whose executable is json-digger-desktop (json-digger-desktop.exe on Windows). Relative paths are resolved against the current folder. JSON Digger first restores your last session, then opens each file in a new tab, so the last file becomes the active tab.

Paths that do not exist are skipped. If JSON Digger is already running, the files open in the running window.

To browse JSON in the terminal instead, use jdig.

JSON Digger opens files compressed with gzip (.gz) or Zstandard (.zst). It recognizes them by their content, so a gzip file opens correctly whatever its name. ZIP, bzip2, and xz archives are not supported.

The name inside the archive decides the format: logs.ndjson.gz opens as NDJSON, data.json.zst as JSON, and app.log.gz as plain text. An archive with no inner extension, such as data.gz, is read by its content.

Opening an archive decompresses it into JSON Digger’s cache folder first. A notice shows the progress, with a Cancel button. The tab shows the archive’s name; hover over it to see the compressed and decompressed sizes. For the largest archive JSON Digger can decompress, see Limits.

The decompressed copy is reused the next time you open the same unchanged archive, so the second open is fast. JSON Digger deletes a copy that has not been used for 7 days. To delete them earlier, open Preferences → General and select Clear next to Decompressed copies; copies of open documents are kept. The data folders list where the copies are.

An archive opens read-only. Save As writes the decompressed content to a new file, and Save Formatted Copy writes it pretty-printed or minified.

JSON Digger reads UTF-8 files, with or without a byte order mark (BOM). The status bar shows the encoding. A BOM is kept when you edit or save the file, and Save Formatted Copy offers to keep it.

Line endings can be LF or CRLF. JSON Digger shows both the same way and keeps the file’s line endings when you edit it.