Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>CSV TableNew to Visual Studio Code? Get it now.
CSV Table

CSV Table

Marcin Ukleja

|
3 installs
| (0) | Free
Browse and edit CSV as readable tables, with customizable views, automatic alignment and colors, and conditional formatting.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CSV Table

CSV Table: readable, editable CSV preview

Browse and edit CSV files as readable tables in VS Code. Customize colors and alignment by data type or by selected range, and use conditional formatting to make values easier to scan.

Features

  • Readable preview. Turn dense CSV text into a structured table.
  • Direct editing. Edit cells in the table and update the source CSV.
  • Type-aware formatting. Detect text, numbers, dates, and booleans; customize colors and alignment or set a column's type when values include currency or units.
  • Range styling. Set colors, alignment, and overflow for columns, rows, cells, or ranges.
  • Conditional formatting. Apply supported styles based on a cell value or another field.
  • Flexible columns. Fit widths to content or set limits; wrap or truncate long values.
  • Table navigation. Use comment rows to divide sections, follow row numbers and column letters, and freeze rows or columns.
  • Reusable views. Configure all files, a workspace, or selected files.

CSV Table detects common separators and supports quoted and multiline fields, including tab-separated files (TSV).

Choose CSV Table from the Reopen Editor With… menu to open a file as a table. The normal text editor remains available through the same menu.

Settings

CSV Table is configured by default to make most CSV files easy to read. The settings below let you tailor colors, alignment, and other parts of the view to your needs.

Configure a view at three levels. Later levels can refine earlier ones:

Level Applies to Configure in
VS Code User All CSV files you open VS Code User settings
Workspace Files in the current workspace VS Code Workspace settings, usually .vscode/settings.json
Selected files The individual files with an adjacent configuration A sidecar such as orders.csv.table.json

Workspace settings can also select groups of files by name or path. Those file rules belong to the Workspace level; their syntax is in the configuration reference below.

Available settings

✓ marks supported targets; blank cells mean unsupported. Indented rows belong to the object above them.

Setting Default Available values file column row cell Description
separator auto auto, comma, semicolon, tab, pipe ✓ Set the delimiter or detect it.
commentPrefix # Any string; "" disables comments ✓ Mark comment lines with this prefix.
hasHeaderRow true true, false ✓ Use the first record as headings.
showCoordinates true true, false ✓ Show row numbers and column letters.
frozenRows 1 0, 1, 2, 3, … ✓ Keep the first N CSV rows visible.
frozenColumns 0 0, 1, 2, 3, … ✓ Keep the first N CSV columns visible.
booleanValues [ "true", "false", "yes", "no" ] Any list of strings ✓ Recognize listed strings as booleans.
typeColors
↳ text default default, red, yellow, green, cyan, blue, magenta, muted ✓ Text color.
↳ comment muted Same as above ✓ Comment color.
↳ number yellow Same as above ✓ Number color.
↳ date magenta Same as above ✓ Date color.
↳ boolean cyan Same as above ✓ Boolean color.
typeAlignments
↳ text left left, right ✓ Text alignment.
↳ number right Same as above ✓ Number alignment.
↳ date right Same as above ✓ Date alignment.
↳ boolean left Same as above ✓ Boolean alignment.
columnSizing
↳ mode max min, max, fix, fit ✓ ✓ Resize mode.
↳ value 32 Any integer ≥ 2 ✓ ✓ Width in characters.
dataType auto auto, text, number, date, boolean ✓ ✓ ✓ ✓ Choose the type used for coloring and alignment.
coloring byType byType, default, red, yellow, green, cyan, blue, magenta, muted ✓ ✓ ✓ ✓ Set a color or use detected type.
alignment byType byType, left, right ✓ ✓ ✓ ✓ Set left, right, or type-based alignment.
contentOverflow wrap wrap, truncate ✓ ✓ ✓ ✓ Wrap or truncate long values.

Customize a view

Use CSV Table’s Edit Table Settings command to create or open a sidecar next to a CSV file. Its name is the CSV filename plus .table.json, for example orders.csv.table.json. Each sidecar example below stands on its own. The examples include comments for explanation; remove them before saving a sidecar, which requires strict JSON.

1. Settings for the whole table

{
  "separator": "semicolon", // Use `;` as the separator
  "commentPrefix": "//", // CSV comments start with `//`
  "hasHeaderRow": false,    // Treat the first row as data
  "showCoordinates": false, // Hide column letters and row numbers
  "frozenRows": 0,          // Unfreeze the first row
  "frozenColumns": 1        // Freeze the first column
}

2. Table settings and targeted rules

{
  "booleanValues": ["paid", "unpaid"], // Replace boolean values with `paid` and `unpaid`
  "typeColors": {
    "number": "blue"                   // Number color: `yellow` to `blue`
  },
  "typeAlignments": {
    "date": "left"                     // Date alignment: `right` to `left`
  },
  "rules": [
    // RULE 1: AMOUNT
    {
      "target": {
        "column": {
          "firstCell": "amount"        // Match `amount` in the first row
        }
      },
      "settings": {
        "dataType": "number"           // Style currency values as `number`
      }
    },
    // RULE 2: NOTES
    {
      "target": {
        "column": "H"                  // Select column `H` by letter
      },
      "settings": {
        "columnSizing": {
          "mode": "fix",               // Keep the width fixed
          "value": 48                  // Width: `48` characters
        },
        "contentOverflow": "truncate"  // Hover for full text; focus to edit
      }
    },
    // RULE 3: ORDER
    {
      "target": {
        "row": {
          "firstCell": "1001"          // Match `1001` in the first column
        }
      },
      "settings": {
        "coloring": "green"            // Color this row `green`
      }
    }
  ]
}

Use one of these selectors inside target (or a single value in a conditional source):

Target Single value Range or selection
column "B", 2, or { "firstCell": "amount" } "B:D", ["B:D", "F"]
row 7 or { "firstCell": "1001" } "2:5", [2, "5:8"]
cell "B7" "B7:D12", ["B7", "D9:F12"]

Each target selects exactly one of column, row, or cell. Use "*" to select all of that kind, or omit target to apply a rule to the whole table. A source identifies one column, row, or cell, without ranges, lists, or "*".

firstCell selects by exact text in the first data row for a column, or in the first column for a row. It works whether or not the table has a header row. Values are case-sensitive after trimming surrounding spaces. A missing or duplicate value is skipped with a warning. Row numbers are physical file lines: comments and blank lines count, and a header uses its actual line number.

3. Conditional formatting

{
  "rules": [
    // RULE 1: STATUS COLUMN
    {
      "target": {
        "column": {
          "firstCell": "status"   // Match `status` in the first row
        }
      },
      "settings": {
        "alignment": "right"      // Align `status` to the `right`
      }
    },
    // RULE 2: OPEN ROWS
    {
      "target": {
        "row": "*"                // Select all rows with `*`
      },
      "when": {
        "source": {
          "column": {
            "firstCell": "status" // Read `status` in the same row
          }
        },
        "operator": "equals",     // Compare exact values
        "value": "open"           // Match `open`
      },
      "settings": {
        "coloring": "yellow"      // Color matching rows `yellow`
      }
    }
  ]
}

when tests each selected cell by default. Use source to test a column in the same row, a row in the same column, or a fixed cell instead. In the example above, each row is colored yellow when the value at its intersection with the status column is open.

Use these names in operator: equals (=), notEquals (!=), greaterThan (>), greaterThanOrEqual (>=), lessThan (<), lessThanOrEqual (<=).

Equality operators accept strings or numbers; string comparisons are case-sensitive. Ordering operators require a number. Numeric comparisons skip empty and non-numeric cells.

4. User or Workspace settings

{
  "CSVTable.showCoordinates": false, // Hide coordinates in scope
  "CSVTable.rules": [
    // RULE 1: ORDERS FILES
    {
      "files": "**/orders.csv",      // Match `orders.csv` in any folder
      "settings": {
        "frozenColumns": 1           // Freeze the first column
      }
    }
  ]
}

Use VS Code User settings for all CSV files, or Workspace settings for the current workspace. Top-level properties use the CSVTable. prefix; nested properties stay unprefixed. VS Code settings accept comments.

In a rule, files accepts a workspace-relative path, a glob, or a list of either, using / as the path separator. For example, "**/orders.csv" matches that filename in any folder, while "exports/*.csv" matches CSV files directly in exports. Omit files to match all files in scope. A sidecar already applies to its adjacent CSV, so it usually needs no files selector.

Configure with an AI assistant

If the settings feel difficult to configure, ask an AI agent of your choice for help. It should have access to the CSV Table extension's settings documentation and schema, which describe the available options.

For example:

In orders.csv, freeze the first column. Make the notes column muted and wider so I can read more of each note.

Roadmap

  • Sort rows
  • Filter rows
  • Reorder rows and columns
  • Add rows and columns
  • Delete rows and columns
  • Hide rows and columns
  • Choose between text and background coloring
  • Apply conditional color scales
  • Color text or backgrounds from hex values stored in cells

License

MIT; see LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft