Format Detection Issues
VisiData auto-detects file format from the extension and first bytes. When it guesses wrong, your data looks garbled. This page covers every common detection failure and the exact flag to fix it.
When a file opens wrong, close it and reopen with explicit -f format. This is always faster than trying to fix it from inside VisiData.
Wrong Delimiter (CSV Opens as One Column)
Symptom: All data appears in a single column. Column count = 1.
Cause: File uses semicolon (;), tab, or pipe (|) instead of comma.
Fix:
# Semicolon (common in European locale CSV exports)
vd -f csv --csv-delimiter ';' data.csv
# Tab-separated
vd -f tsv data.csv
# or
vd -f csv --csv-delimiter '\t' data.csv
# Pipe-separated
vd -f csv --csv-delimiter '|' data.csv
Alternative — fix in-app:
vd data.csv
Shift+O
# Search for csv_delimiter → press e → type ; → Enter
Ctrl+R # reload with new setting
File Opens as Plain Text (Wrong Format)
Symptom: File opens as a single text column with raw lines, not structured data.
Cause: Extension not recognized, or VisiData defaulted to text mode.
Fix:
# Force CSV format
vd -f csv /var/log/app/requests.log
# Force JSON
vd -f json api_response
# Force fixed-width
vd -f fixed --skip 1 output.txt
Header Row Misidentified
Symptom A: First data row is used as column headers. Symptom B: Column headers appear as the first data row.
Causes and fixes:
# No header row — treat all rows as data
vd -f csv --header 0 data.csv
# Multiple header rows (skip first 2)
vd -f csv --header 2 data.csv
# Comment rows before the real header
vd -f csv --skip 3 data.csv # skip 3 rows, then read header
Encoding Error (Garbled Characters)
Symptom: Non-ASCII characters display as ? or \xc3 sequences.
Fix:
# Latin-1 / ISO-8859-1 (common in older European data)
vd --encoding latin1 data.csv
# Windows-1252 (common in Excel exports)
vd --encoding cp1252 data.csv
# UTF-16 (some Windows tools export this)
vd --encoding utf-16 data.csv
Detect encoding first:
file data.csv # file type and encoding hint
python3 -c "import chardet; print(chardet.detect(open('data.csv','rb').read(10000)))"
JSON Opens as Text Column
Symptom: JSON file opens but shows raw JSON strings instead of parsed columns.
Causes:
| Cause | Fix |
|---|---|
| Malformed JSON | python3 -m json.tool data.json to validate |
| JSON object (not array) at root | VisiData expects an array; wrap: echo "[$(cat data.json)]" |
| JSONL (one object per line) misread | Use vd -f jsonl data.json |
# Validate JSON before opening
python3 -m json.tool ~/github/practice-folder/visidata/02-json/01-events.jsonl
# Force JSONL format
vd -f jsonl ~/github/practice-folder/visidata/02-json/01-events.jsonl
Excel Import Error
Symptom: ImportError: No module named 'openpyxl'
Fix:
pip install openpyxl
Then:
vd report.xlsx
Fixed-Width Columns Misaligned
Symptom: ps aux | vd -f fixed shows columns that don't match the actual data.
Cause: VisiData samples the first N rows to detect column boundaries. If the sample has short lines, detection fails.
Fix:
# Increase sample size for detection
vd -f fixed --fixed-rows 5000 data.txt
# Or skip the header before fixed-width parsing
ps aux | vd -f fixed --skip 1
SQLite Tables Missing or Empty
Symptom: SQLite file opens to an empty table list.
Causes:
| Cause | Fix |
|---|---|
| Old VisiData version | pip install --upgrade visidata |
| Database is encrypted | Decrypt first or use a SQLite viewer |
| Wrong file (not SQLite) | file data.db to confirm |
# Verify it's really SQLite
file ~/github/practice-folder/visidata/08-sysadmin/site.sqlite
# Expected: SQLite 3.x database
Format Option Quick Reference
| Situation | Flag |
|---|---|
| Semicolon delimiter | --csv-delimiter ';' |
| Tab delimiter | -f tsv |
| No header row | --header 0 |
| Skip N rows | --skip N |
| Non-UTF-8 encoding | --encoding latin1 |
| Force format | -f csv / -f json / -f fixed / -f tsv |
| Fixed-width sample size | --fixed-rows 5000 |
| Limit row count | --max-rows 100000 |