Column Extractor

Select columns from a CSV by name, number or range — and get them back in the order you asked for.

Runs on your deviceDataWorkingNo account needed

What this tool does

Column Extractor parses your CSV, works out which columns your list refers to, and writes a new CSV built from the ones that survive. Columns can be named by their header text, by a 1-based number, or by a range such as 3-5, and the three forms can be mixed in one list. In Keep mode the output follows the order you typed, so 'email, name' is a reordering as well as a subset; in Remove mode everything you did not name stays in its original order.

Header names are matched without regard to case, and surrounding quotes and spaces in your list are ignored, so Email and email find the same column. If two columns share a header, the name matches the first of them and the second has to be reached by its number. With 'First row is a header' switched off there are no names to match against at all, and the columns have to be given as numbers. Your list is split on commas and line breaks before any of that begins, so a header that itself contains a comma cannot be picked out by name — quoting it does not rescue it, and its number is the only way to reach it.

Input delimiter detection reads the first five lines and picks whichever of comma, semicolon, tab or pipe occurs most often. That count includes separators sitting inside quoted text, so a semicolon-separated export with commas in an address field can be misread as comma-separated — when the result looks wrong, set the delimiter yourself rather than leaving it on automatic. The output delimiter defaults to whatever the input used, and any value containing it, a quote or a line break is re-quoted on the way out.

The work happens in this browser tab: you paste the CSV in and copy the result out, so nothing is uploaded. That is also the practical ceiling — there is no file picker and no download button, so a several-hundred-thousand-row export is better split before it comes here. What you get back is the same text you put in: cells are copied across as they were parsed, with no number, date or currency reformatting, and no rows sorted, added or removed beyond blank lines and the optional empty-row drop.

How to use it

  1. Paste the CSV. Put the text in the input box, or press Load sample for a seven-row table that includes a quoted comma. Blank lines and a leading byte-order mark are ignored.
  2. Name the columns you want. Header names, 1-based numbers or ranges, separated by commas: 'email, name' or '1, 3-5'. A range may run backwards, so 5-3 returns columns 5, 4 and 3 in that order.
  3. Choose keep or remove. Keep only these columns returns them in the order you listed. Remove these columns cuts those fields and leaves the rest as they were; a spec that would remove every column is refused.
  4. Set the delimiters. Leave input detection on automatic or name the separator, and pick an output delimiter if the result should use a different one from the input.
  5. Run and copy the result. The output pane holds the new CSV and the summary line reports how many columns and rows came out. Turn on the empty-row option first if rows that lose all their content should go too — the header row is kept either way.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Sending a contact list to a supplier

Export the whole table, then keep only name and email so the recipient never sees the internal IDs, revenue figures and notes that sat beside them.

Matching an importer's column order

Most import screens want a fixed set of headers in a fixed order. Listing them in that order both selects the columns and arranges them in a single pass.

Trimming a wide report

A sixty-column export is unreadable. Cutting it to the eight fields you actually use makes it small enough to scan without a spreadsheet.

Dropping a field you should not be holding

Remove mode cuts fields such as a date of birth or a phone number and leaves everything else untouched, which is faster than rebuilding the file by hand.

Questions

Does the CSV ever leave this tab?
No. Column Extractor parses and rewrites the text inside this browser tab, so the data never reaches a server and the tool still works with the network disconnected.
Can it reorder columns as well as select them?
Yes. In Keep mode the output follows your list, so 'email, name' returns those two columns in that order however they were arranged in the input.
What happens to rows with too few cells?
Every row is padded to the width of the widest row before the columns are picked, so a short row produces empty cells rather than an error or a value shifted into the wrong field.
Why does it say a column does not exist?
Either the name is absent from the header row — the message then lists up to twenty of the headers it did find, so a very wide file shows only the start of them — or the number runs past the last column, counting to the width of the widest row. With the header checkbox off, names cannot be matched at all.
Can I ask for the same column twice?
No. A repeated name or number collapses to one copy, so the output never contains the same source column more than once.
Does it alter the values?
Cells are carried over as text. Quoting is recalculated for the output delimiter and lines are joined with CRLF, but numbers, dates and leading zeros are left exactly as they were typed.
Can I filter rows instead of columns?
Not here — this tool only chooses columns. Removing repeated rows is Remove Duplicates, and tidying whitespace or casing inside cells is Data Cleaner.

Related tools

  • JSON to CSV — Flatten a JSON array into a CSV table.
  • CSV to JSON — Turn a CSV file into structured JSON.
  • CSV Viewer — Open and browse a large CSV without a spreadsheet app.
  • CSV to Excel — Convert CSV files into an XLSX workbook.
  • Excel to CSV — Export spreadsheet sheets to CSV.
  • CSV Merge — Combine multiple CSV files with matching columns.