Skip to content

CSV Column Extractor

Keep only the columns you need from a CSV, chosen by header name, position or range, in the order you list them.

Processed locally in your browser

Options

Header names or 1-based numbers, separated by commas. Ranges work too: 1,3-4,email. Use "quotes" around names containing commas.

0 chars · 0 lines
The result will appear here.

What is CSV Column Extractor?

Exports often contain dozens of columns when you only need a few. Instead of opening a spreadsheet, you can list the columns to keep and get a smaller CSV in one step.

The columns option accepts header names (case-insensitive), 1-based positions and ranges, mixed freely: 1,3-4,email. Columns are output in the order you write them, so the tool also reorders and duplicates columns. Names containing commas can be wrapped in double quotes.

How does it work?

  1. Paste the CSV or open a file.
  2. Type the columns to keep, for example name,5 or 1,3-4,email. Use "3-" to mean column 3 to the end.
  3. Untick "First row is a header" if there are no column names; then use numbers only.
  4. Copy the result or download it, and check the preview table.

Common use cases

  • Trimming a large analytics export down to the three columns a report needs.
  • Reordering columns to match the layout an importer expects.
  • Extracting an email column to paste into a mailing tool.
  • Removing personal data columns before sharing a sample file.

Examples

Try this input in the tool above:

Input
id,name,email,city,age
1,Alice Martin,alice@example.com,Paris,34
2,Bob Durand,bob@example.com,"Lyon, France",28
3,Chloé Petit,chloe@example.com,Nice,41
4,David Roux,david@example.com,Paris,19
Output
name,age,city
Alice Martin,34,Paris
Bob Durand,28,"Lyon, France"
Chloé Petit,41,Nice
David Roux,19,Paris

Privacy

CSV Column Extractor runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

An unknown column name or an index beyond the last column stops the conversion with an error rather than silently skipping it.

Frequently asked questions

Can I use both names and numbers?

Yes. Tokens can be mixed, for example id,3,city. If a header is literally a number, the exact header name is matched first.

Will the columns be reordered?

Yes, the output follows the order of your list. Writing 3,1 outputs the third column first.

How do I select a column whose name contains a comma?

Wrap the name in double quotes in the list, for example "last, first",email.

More tools in JSON & Data →