CSV Column Extractor
Extract specific columns from CSV data by column number or header name. Handles quoted fields with embedded commas, newlines and escaped double quotes — not a naive comma split — with comma, semicolon, tab or pipe delimiters.
Input
Options
Comma-separated column numbers (1,3) or header names (when headers are enabled). Leave blank to extract every column, in original order.
Output
Preview
| No data yet |
Guides
Pull specific columns out of a CSV file without opening a spreadsheet. Paste your data or upload a .csv, tell it which columns you want — by number or by header name — and get a clean CSV (or a plain list, for a single column) back in seconds.
How to use it
- Paste your CSV into the input box, or drop a
.csvfile onto the uploader. - Pick the delimiter — comma, semicolon, tab or pipe — matching your file.
- Toggle First row contains headers depending on whether row one is data or column names.
- In Columns to extract, list what you want: header names (
name,email) if headers are on, or 1-based column numbers (1,3) either way. Leave it blank to keep every column, reordered to match what you typed. - Copy or download the result, or check the Preview table underneath to sanity-check it before you use it.
How does it handle commas inside a field?
Properly — this isn't a .split(","). The parser understands real CSV quoting: a field wrapped in double quotes can contain the delimiter, a line break, or an escaped double quote ("" inside a quoted field means a literal "), and none of that gets mistaken for a column boundary. A name column with "Smith, Carol" in it extracts as one field, not two.
Can I extract columns by name instead of number?
Yes, whenever First row contains headers is on — type the header text exactly as it appears (matching is case-insensitive), comma-separated: name,email,city. With headers off, only numeric positions work, since there's nothing to match by name.
What if I only pick one column?
The output switches to a plain newline-separated list instead of a one-column CSV — easier to paste into another tool or a spreadsheet formula bar, and there's no delimiter ambiguity to quote around when there's only one column.
Can I reorder or drop columns at the same time?
Yes — the output follows the order you list in Columns to extract, so city,name swaps the two columns, and any column you don't list is simply left out. That covers both extracting and reordering in one step.
Does the delimiter setting also apply to the output?
Yes — whatever you pick for parsing the input is reused for the extracted CSV, so a semicolon-delimited file in produces a semicolon-delimited file out (except in single-column mode, where there's no delimiter to preserve).
Is there a row limit?
No — every matching row is extracted into the copyable/downloadable output. The Preview table below it caps at the first 50 rows purely so a huge file doesn't slow down the page; the full result is always in the output box.
Is my data uploaded anywhere?
No. Parsing and extraction run entirely in your browser — your CSV never leaves your device, is never logged and is never stored. It's safe to use on files containing customer records or other sensitive data.
Use it from code
From 3 credits per callREST API
curl -X POST https://api.iotools.cloud/v1/tool/csv-column-extractor \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"csvSource": "name,age,city,department,salary\nAlice Johnson,30…",
"delimiter": ",",
"firstRowHeaders": "true",
"columns": "name,city"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `csv-column-extractor` tool (CSV Column Extractor) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.