CSV Column Deleter
Delete specific columns from CSV files instantly in your browser. Select and remove unwanted columns with preview, auto-delimiter detection, and instant download.
About
Removing columns from a CSV file with a text editor is error-prone. One misplaced comma inside a quoted field breaks every downstream parser. This tool implements an RFC 4180-compliant parser that correctly handles quoted fields containing commas, newlines, and escaped double-quotes (""). It auto-detects delimiters (comma, semicolon, tab, pipe) by frequency analysis across the first 5 rows and preserves data integrity during column removal. All processing runs locally in your browser. No data leaves your machine.
Limitation: the tool assumes consistent column counts. Rows with fewer fields than the header are padded; rows with more are truncated to header length. Maximum file size is 100 MB. For files exceeding 5 MB, parsing offloads to a Web Worker to keep the interface responsive. The output preserves the original quoting style only where necessary (fields containing the delimiter, quotes, or newlines are re-quoted).
Formulas
Auto-delimiter detection scores each candidate delimiter by consistency of field counts across sampled rows:
Where d is the candidate delimiter, fieldsd is the array of field counts per row when split by d, mode returns the most frequent field count, count(mode) is how many rows match that mode, and N is the number of sampled rows. The delimiter with the highest score wins. Ties are broken by priority order: comma > semicolon > tab > pipe.
Column removal reconstructs each row by filtering indices not in the deletion set D:
Where m is total column count and D is the set of column indices selected for deletion. Re-serialization quotes any field containing the delimiter, a double-quote character, or a newline.
Reference Data
| Delimiter | Symbol | Common File Extensions | Auto-Detected | Notes |
|---|---|---|---|---|
| Comma | , | .csv | Yes | RFC 4180 standard delimiter |
| Semicolon | ; | .csv | Yes | Common in European locales where comma is decimal separator |
| Tab | \t | .tsv, .tab | Yes | Tab-separated values; rarely needs quoting |
| Pipe | | | .csv, .psv | Yes | Used in medical (HL7) and financial data feeds |
| Space | .txt | No | Ambiguous; use manual override | |
| Colon | : | .csv | No | Rare; conflicts with time formats |
| Double Quote Escape | "" | - | - | Two consecutive quotes represent a literal quote inside a quoted field |
| BOM (Byte Order Mark) | U+FEFF | - | Stripped | UTF-8 BOM at file start is automatically removed |
| CRLF Line Ending | \r\n | - | Handled | Windows-style line endings normalized |
| LF Line Ending | \n | - | Handled | Unix/macOS line endings |
| CR Line Ending | \r | - | Handled | Legacy Mac OS (pre-OS X) |
| Quoted Newline | "a\nb" | - | Handled | Newlines inside quoted fields are preserved, not treated as row breaks |
| Empty Field | ,, | - | - | Two consecutive delimiters produce an empty string field |
| Trailing Delimiter | a,b, | - | - | Trailing delimiter creates one extra empty field |