CSV Column Extractor
Pick, drop and reorder CSV columns in the browser — quoting, embedded newlines and odd delimiters all handled.
Columns
Paste or upload a CSV and its columns appear here.
Input
paste, or upload a .csvOutput
Load a CSV to see its columns.
About this CSV column extractor
Pick the columns you care about, drop the rest, and get valid CSV back. Selection order becomes output order, so this doubles as a column reorderer — useful when a downstream importer expects a fixed header sequence. Everything runs in your browser; no row ever leaves the page.
Why not just split on commas
CSV is not a comma-separated list of values — it is a quoting format. Under RFC 4180, a field may be wrapped in double quotes, and a quoted field is allowed to contain the delimiter, a literal newline, and quote characters themselves (escaped by doubling them: "he said ""hi"""). A naive line.split(",") shreds "Doe, Jane" into two fields and shifts every column after it. Splitting on newlines first is just as wrong, because an address field can legally span several physical lines. This tool parses with a real streaming CSV parser, so quoted commas and embedded newlines survive the round trip.
Headers, duplicates, and the BOM
Rows are keyed by header name. When a file repeats a header — two id columns, say — the later one wins in a keyed object and the earlier is silently lost, so duplicates are flagged before you select anything. Excel and Google Sheets also write a UTF-8 BOM at the start of the file, which turns the first header into U+FEFF id and makes exact-name lookups fail; the BOM is stripped on load.
Delimiters and TSV
The delimiter is detected from the file, so comma, tab, semicolon, and pipe-separated exports all load without configuration. Semicolons are the norm in locales where the comma is the decimal separator. On output you choose the delimiter independently — tab-separated is the safer target when the data is full of commas, since far fewer fields then need quoting at all, though tabs inside a field still do. Turn on quote all fields when the consumer is strict or when you want numeric-looking IDs to stay text.
Tip: parse warnings report a row index. A stray TooFewFields usually means an unbalanced quote earlier in the file swallowed a line break.