Skip to main content

Opening Files and Format Options

VisiData auto-detects file formats from the extension and presents them as navigable sheets. When auto-detection fails, you specify the format explicitly with -f.

Learning Focus

Learn the four ways to get data into VisiData: file, directory, URL, and stdin pipe. Know when to use -f to override format detection and which options control parsing for each format.

Open a CSV File

vd ~/github/practice-folder/visidata/01-loading/01-employees.csv

Result:

name department salary hire_date email
Alice Engineering 85000 2020-03-15 alice@company.com
Bob Marketing 70000 2019-11-01 bob@company.com
Charlie Engineering 90000 2021-06-20 charlie@company.com

Open with Explicit Format (-f)

When the file extension doesn't match the actual content:

vd -f csv /var/log/app/requests.log
vd -f json api_response
vd -f fixed --skip 1 data.txt
cat /var/log/syslog | vd -f txt

Open Multiple Files

vd ~/github/practice-folder/visidata/03-join/01-servers.csv \
~/github/practice-folder/visidata/01-loading/01-employees.csv

Press Shift+S to see both sheets listed. Press Alt+1 / Alt+2 to switch.

Open from Inside VisiData (o)

While already in VisiData, press o to open another file:

o
# Enter path: ~/github/practice-folder/visidata/02-json/01-events.jsonl
# Tab completion works for paths
caution

Ctrl+O opens the current cell in your $EDITOR. Use plain o to open a file.

Open a Directory (Browser)

vd ~/github/practice-folder/visidata/05-logs/

Opens a Directory Sheet — file browser with filename, size, modified columns. Press Enter on any file to open it.

Open a SQLite Database

vd /var/www/html/db/site.sqlite

Shows a table directory: press Enter on any table to open it as a sheet. SQLite uses lazy loading — only the table you open is read into memory.

Reload After External Changes (Ctrl+R)

vd ~/github/practice-folder/visidata/05-logs/01-access.log
# After new entries are appended externally:
Ctrl+R

Format-Specific Loading

CSV and TSV

# Standard CSV
vd data.csv

# Semicolon delimiter (EU locale)
vd -f csv --csv-delimiter ';' /tmp/eu_data.csv

# No header row
vd -f csv --header 0 data.csv

# Skip first 2 rows (comments)
vd -f csv --skip 2 data.csv

JSON and JSONL

# JSON array
vd ~/github/practice-folder/visidata/02-json/02-products.json

# JSONL (one JSON object per line)
vd ~/github/practice-folder/visidata/02-json/01-events.jsonl

JSON vs JSONL:

FeatureJSONJSONL
StructureSingle array [{...}]One object per line
PerformanceFull parse at loadStreamed line by line
Extension.json.jsonl, .ndjson

For nested JSON fields, see Nested JSON Columns.

Excel (XLSX)

# Requires: pip install openpyxl
vd report.xlsx

Use Shift+S to switch between worksheets.

Parquet

# Requires: pip install pyarrow
vd analytics.parquet

Fixed-Width Text

ps aux | vd -f fixed --skip 1
df -h | vd -f fixed --skip 1
ss -tulnp | vd -f fixed

Log Files

vd /var/log/syslog
vd ~/github/practice-folder/visidata/05-logs/01-access.log
journalctl --since "1 hour ago" --no-pager | vd -f txt

HTML Tables

vd -f html page.html
vd https://en.wikipedia.org/wiki/List_of_countries_by_GDP

Format Auto-Detection by Extension

ExtensionFormat loaded
.csvComma-separated values
.tsvTab-separated values
.jsonSingle JSON object or array
.jsonl / .ndjsonOne JSON object per line
.sqlite / .dbSQLite database (table directory)
.xlsx / .odsSpreadsheet
.log / .txtFixed-width or plain text
.parquetApache Parquet
.htmlHTML tables
DirectoryDirectory Sheet (file browser)

Format Option Reference

OptionDefaultDescription
--csv-delimiter,Field delimiter for CSV
--csv-quotechar"Quote character
--header1Number of rows to treat as column names
--skip0Number of rows to skip before header
--encodingutf-8-sigFile encoding
--max-rowsunlimitedLimit rows loaded
--fixed-rows1000Rows to sample for fixed-width detection

Changing Format Options In-App (Shift+O)

Instead of restarting with different CLI flags, adjust options inside VisiData:

# Inside VisiData after opening a file:
Shift+O
# Navigate to csv_delimiter → press e → type ; → Enter
# Press q → return to sheet
# Press Ctrl+R → reload with the new delimiter

Troubleshooting

ProblemCauseFix
Garbled columnsWrong delimiterUse -f tsv or --csv-delimiter ';'
File opens as plain textExtension not recognizedAdd -f csv or correct format
First row is data, not headerHeader misidentified--header 0
Encoding errorsNon-UTF-8 file--encoding latin1
SQLite tables missingOld VisiData versionpip install --upgrade visidata
Excel import erroropenpyxl missingpip install openpyxl
Parquet import errorpyarrow missingpip install pyarrow
JSON opens as textMalformed JSONValidate with jq . first

What's Next