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.
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
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:
| Feature | JSON | JSONL |
|---|---|---|
| Structure | Single array [{...}] | One object per line |
| Performance | Full parse at load | Streamed 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
| Extension | Format loaded |
|---|---|
.csv | Comma-separated values |
.tsv | Tab-separated values |
.json | Single JSON object or array |
.jsonl / .ndjson | One JSON object per line |
.sqlite / .db | SQLite database (table directory) |
.xlsx / .ods | Spreadsheet |
.log / .txt | Fixed-width or plain text |
.parquet | Apache Parquet |
.html | HTML tables |
| Directory | Directory Sheet (file browser) |
Format Option Reference
| Option | Default | Description |
|---|---|---|
--csv-delimiter | , | Field delimiter for CSV |
--csv-quotechar | " | Quote character |
--header | 1 | Number of rows to treat as column names |
--skip | 0 | Number of rows to skip before header |
--encoding | utf-8-sig | File encoding |
--max-rows | unlimited | Limit rows loaded |
--fixed-rows | 1000 | Rows 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
| Problem | Cause | Fix |
|---|---|---|
| Garbled columns | Wrong delimiter | Use -f tsv or --csv-delimiter ';' |
| File opens as plain text | Extension not recognized | Add -f csv or correct format |
| First row is data, not header | Header misidentified | --header 0 |
| Encoding errors | Non-UTF-8 file | --encoding latin1 |
| SQLite tables missing | Old VisiData version | pip install --upgrade visidata |
| Excel import error | openpyxl missing | pip install openpyxl |
| Parquet import error | pyarrow missing | pip install pyarrow |
| JSON opens as text | Malformed JSON | Validate with jq . first |
What's Next
- Exporting and Batch Mode — saving, batch conversion, pipe output
- Performance and Profiling — large files, sampling, format speed