CSV Sidekick
A fast, dependable CSV workspace for analysts and data scientists in Visual Studio Code.
Open CSV, TSV, TAB, and PSV files as responsive tables, inspect real-world data
without breaking on messy values, and move clean selections straight into
Excel, notebooks, documentation, or a downstream workflow.
Built for day-to-day data work
- Explore large extracts comfortably. Virtualized rows and columns keep
wide and large files responsive, while frozen headers and Excel-style pane
freezing preserve the context you need as you scan.
- Trust what you are seeing. Correct parsing handles quoted values,
escaped quotes, embedded delimiters, and multiline fields. CSV Sidekick
detects comma, tab, semicolon, and pipe delimiters automatically.
- Shrug off sloppy exports. When every line ends with a delimiter—a common
habit of report generators—the table ignores the empty column it creates
instead of showing a phantom field, and the file summary tells you it did. A
column is only ignored when every record leaves it blank.
- Profile every column at a glance. Open Data profile for full-dataset
column types, valid and missing-value counts, unique values, distributions,
and—when values are numeric—mean, minimum, and maximum. It is a quick first
pass for finding quality issues and understanding a new extract.
- Catch data-quality problems before they travel. Open Data quality to
scan every record for inconsistent column counts, unclosed quoted fields,
missing or duplicate ID-like values, and invalid dates. The report explains
its automatic ID/date inference, and clicking an issue jumps to its source
cell without changing the file.
- Open data from the real world. Automatic encoding detection supports
UTF-8, UTF-16 BOMs, and a Windows-1252 fallback—useful for files exported
from spreadsheets, BI tools, and legacy systems.
- Follow every field across a wide table. Each column is colorized with a
repeating, color-blind-friendly 16-color palette, making records easier to
scan horizontally. Numeric values are also right-aligned with tabular
spacing for fast comparison.
- Pick a theme that suits your eyes. The Theme toolbar button cycles
between following VS Code and a colorblind-friendly light or dark theme
built from the Okabe-Ito palette, with text held at WCAG AA contrast. The
choice is one setting, so every open viewer follows it and it survives a
reload; PK CSV: Switch Viewer Theme does the same from the palette.
- Sort without rewriting the file. Click a column header to cycle through
ascending, descending, and original file order. Sorting understands clean
numeric values—including integers larger than JavaScript can represent
exactly—keeps equal values in their original order, and carries through to
copied or exported data.
- Filter the complete dataset, not just loaded rows. Press Filter or
Ctrl/Cmd+Shift+F to open a stack of conditions—each with its own column,
comparison, and value, joined by "and"—then add or remove rows with
+ Condition. Right-click a cell for Filter by this value, or click a
bar in Data profile, to add a matching condition in one step. Each
column header also has a funnel (shown on hover, lit while that column is
filtered): it lists the column's most frequent values with their counts to
tick, with a search to reach the rest, or offers a From/To range when every
filled value is a number or a year-first date (
2024-01-31). Right-click a
cell for Filter column… to open the same popup. Filtering
runs in the parser worker, so the grid stays virtualized and sorting,
profiles, quality checks, copying, Tail 10, and exports all use the same
matching records.
- Find a value without hiding anything. Press Find or Ctrl/Cmd+F to
search every cell in the file. Matches highlight in the grid; Enter,
Shift+Enter, and F3 step through them and scroll each into view. Narrow the
search to one column, match case, or match the whole cell.
- Trace one value back to its labels. Turn on Focus cell and click a
cell: its whole row and column light up, along with the row number and column
header at the edges of the grid, so you never lose your place in a wide
extract. Column colors step aside while focus mode is on and come back when
you switch it off.
- Focus on what changed. Switch to Tail 10 to inspect the newest ten
records while keeping the header visible—ideal for logs and incremental
exports.
- Clean data safely. Preview trimmed values and normalized headers without
changing the source file; when you do need to edit, use the text-editor
commands with normal VS Code Undo support.
- Select like a spreadsheet. Drag across cells to select a rectangle,
Shift-click to extend it, or click the corner box above the row numbers to
select every displayed cell. Click a cell and the arrow keys, Home, End, Page
Up, Page Down, Tab, and Enter move it; Ctrl/Cmd with an arrow jumps to the
edge, and holding Shift extends the block instead of moving it. Ctrl/Cmd+A
selects all cells, Ctrl/Cmd+Space the active column, Shift+Space its row—and
from there Shift with an arrow key adds whole rows or columns one at a time,
while a plain arrow key drops back to a single cell.
- Read a selection's numbers at a glance. Selecting cells, rows, or
columns shows Count, Distinct, Sum, Average, Min, and Max in a status bar
under the grid—computed in the parser worker, so a block that reaches past
the loaded rows is still summarized correctly.
- Read one wide record at a time. Turn on Record view to list the
active cell's record as one field per line beside the grid, for a record
too wide to read comfortably across. It follows the active cell and the
same Up/Down keys as the grid.
- Share results without cleanup. Copy a cell, a rectangular range, selected
rows or columns, or the complete table as Excel-compatible TSV or a Markdown
table. Use the toolbar, press Ctrl/Cmd+C, or right-click for a copy action
labelled for what is selected. Ctrl/Cmd+Shift+C prepends the header row to a
cell or row selection. Numeric columns stay right-aligned in Markdown.
- Cut a wide extract down to size. Export… opens a column picker
with a filter box, All/None/Invert, and checkboxes that highlight the matching
columns in the table as you tick them. Export directly to CSV, TSV, PSV, or
Excel; choose the delimiter for custom CSV output and whether to include the
header, then save the result as a new file—the source is never touched.
- Send a selection straight to Excel. Switch the export format to Excel
workbook (.xlsx) to write a real spreadsheet instead of delimited text: Thai,
CJK, and accented text arrive intact with no encoding prompt, the header row is
frozen, columns are sized to their content, and clean numeric values become
actual numbers you can sum. Identifiers keep their exact glyphs—
007 stays
007, and currency and percentage text is never silently rescaled.
- Work where your data lives. Supports Remote - SSH, WSL, Dev Containers,
Codespaces, and desktop virtual workspaces such as Remote Repositories.
Your CSV workflow, without leaving VS Code
- Open a
.csv, .tsv, .tab, or .psv file—CSV Sidekick opens it as a table by
default.
- Scan the dataset with a frozen header, filter its full set of records,
auto-fit columns, resize fields, or
freeze panes at the selected cell. Click a column header to sort ascending,
descending, or back into file order, and select Data profile to see each
column's quality and distribution summary.
- Select the values you need: drag across cells for a rectangle, or click a
cell, row number, or column header; Ctrl/Cmd-click to add rows or columns;
Shift-click to extend a range. Ctrl/Cmd-click and Shift-click on a column
header select without re-sorting the table underneath you. Watch the
status bar under the grid for the selection's Count, Sum, Average, Min,
and Max, or turn on Record view to read one wide record at a time.
- Copy the selection for Excel or Markdown, use Export… to save the
columns you picked as a new CSV, TSV, PSV, or
.xlsx file—opening it with a
rectangle selected ticks that block's columns and offers its rows as the
export scope—or choose Open as text when you need to edit the raw file.
The toolbar buttons are icons—hover one for its name and what it does—and
every table action is also available from the right-click menu.
Browse a folder of CSV files
To find the right file without opening each one, right-click a folder—or any
CSV, TSV, TAB, or PSV file, for the folder it sits in—in the Explorer and
choose Browse CSV Files in Folder, or click CSV files in this folder in
the table viewer's toolbar. You get a tab with a card for every CSV-family file
in that folder. Each card shows the file's first ten records and three to five
columns, drawn the way the table would draw them: the header row pinned when
pkCsv.freezeHeader is on, columns tinted when pkCsv.colorColumns is on, and
numbers right-aligned. Under it are the column count, size, date modified, and,
for a file small enough to read whole, the row count.
A card only reads its file once it scrolls into view, and then only the first
64 KB, so a folder of multi-gigabyte extracts browses as quickly as a folder of
small ones. Filter by name (Ctrl/Cmd+F), sort by name, date, or size, and
drag the slider to resize the cards. Click a card, or press Space, to open
it as a table; Ctrl/Cmd+click opens it beside the gallery. Double-click a
card, or press Enter, to open it in the text editor instead. The gallery
refreshes itself when a file in the folder is added, saved, or deleted.
Safe inspection and practical cleanup
The table viewer is read-only: it never modifies the source file. This
makes it a safe place to inspect client extracts, experiment outputs, and
production data.
For an editable CSV in the text editor, right-click and use 🧰 PK CSV to:
- clean header names or convert them to
snake_case, camelCase,
PascalCase, or kebab-case;
- trim whitespace from every field;
- remove the trailing delimiter that some exporters leave at the end of every
line;
- copy the complete file as Excel-ready data or a Markdown table; and
- toggle the same column-color highlighting used by the table view.
Text-editor cleaning commands modify the document and support normal Undo.
Remote and read-only data
Install CSV Sidekick in the VS Code location offered for your remote target,
then open CSV-family files normally or choose Open With…. Viewing and
copying work for virtual repositories that are read-only; text-editing commands
are unavailable when the file cannot be changed.
The browser-only editors at vscode.dev and github.dev are not currently
supported because parsing runs in the Node.js extension host.
Settings
Configure these globally or per workspace, then reopen the file to apply a
change.
| Setting |
What it controls |
pkCsv.delimiter |
Automatic detection or a fixed comma, tab, semicolon, or pipe delimiter. |
pkCsv.encoding |
Automatic detection, UTF-8, UTF-16 LE/BE, or Windows-1252 decoding. |
pkCsv.freezeHeader |
Pin the first record as the table header on open. |
pkCsv.freezeTextHeader |
Keep the first record visible in the text editor. |
pkCsv.colorColumns |
Enable the color-blind-friendly table column palette. |
pkCsv.alternateRows |
Enable alternating table row backgrounds. |
pkCsv.trimWhitespace |
Trim displayed and copied field values on open. |
pkCsv.colorTextColumns |
Color text-editor fields by column. |
pkCsv.theme |
Follow VS Code (auto), or force the colorblind-friendly light or dark table theme. Applies to open viewers immediately. |
pkCsv.gallery.maxPreviewSizeMB |
Remote and virtual files larger than this are listed in the folder gallery without a thumbnail, since they have to be read whole (default 25). Local files are only ever read as far as their first 64 KB. |
Contributing
See DEV.md for development and build instructions.
| |