CSV Column Extractor

Pick out the columns you want from a CSV, in your browser. Choose by header name or 1-based number, in any order.

Document Tools● Free No upload Instant

Loading CSV Column Extractor…

Your browser is preparing the tool. It runs 100% locally.

Quick answer

Paste a CSV and list the columns you want, by header name or 1-based number, comma-separated. The tool outputs a CSV of just those columns, in the order you list them, header included. Anything it cannot match is skipped. The CSV Column Extractor works inside your browser.

What the CSV Column Extractor does

This keeps only the columns you ask for and drops the rest. You list them by header name (such as name) or by 1-based number (such as 1 for the first column), separated by commas.

The chosen columns come out in the order you listed them, so you can reorder as well as filter. The header row is kept, and it skips any name or number it cannot match.

How it works

Paste your CSV, header row first, and type the columns you want to keep.

Each entry is matched first against the header names; if it is not a header, it is read as a 1-based column number.

The matched columns are written out in your listed order, header included. Copy or download the result; your browser does all of it.

Data source & conversion logic

  1. Parse the CSV. The text is parsed into rows, including the header row.
  2. Resolve each column. Each entry you list is matched to a header name, or read as a 1-based number.
  3. Select in your order. The matched columns are pulled from every row in the order you listed.
  4. Output the CSV. The trimmed-down CSV is ready to copy or download.

How columns are selected

List the columns by header name or 1-based number, comma-separated Each entry is matched to a header, else read as a 1-based number Matched columns are output in the order you list them Unrecognised names or numbers are skipped
Worked example
From name,age,city, asking for name,city (or 1,3) keeps those two columns in that order and drops age. The header row stays.

Listing columns in a new order reorders them; a name or number that matches nothing is silently dropped.

Privacy

Your browser processes the CSV. No server is involved and nothing is uploaded.

The data never leaves your device, so even sensitive records stay private.

You don't need an account and the site keeps no copy, so the conversion is gone once you close the tab.

Technical details

InputCSV with header row
Select byHeader name or 1-based number
OrderYour listed order
UnmatchedSkipped
HeaderKept
OutputCSV (.csv)
Processing100% in-browser

Standards & references

  • RFC 4180 (CSV): The parser understands quoted fields, so a value with a comma is treated as a single column when selecting.
  • 1-based numbering: Columns are numbered from 1, so the first column is 1, not 0.

Accuracy and limits

Each entry is matched to a header name first; if it is not a header, it is read as a 1-based column number, where the first column is 1. Mixing names and numbers in one list is fine.

Anything it cannot match is silently dropped. A misspelled header or an out-of-range number does not appear and raises no error, so check that your output has every column you expected.

Columns come out in the order you list them, so you can reorder as well as filter. The header row is kept at the top.

The parser handles quoted fields, so a value containing a comma is treated as one column, not split.

Where people use it

Trim to essentials

Keep only the few columns you need from a wide CSV.

Reorder columns

Output columns in a new order for another tool's import.

Drop sensitive fields

Remove columns you do not want to share by leaving them out.

Build a focused view

Make a small CSV of only the columns a task needs.

When it fits, and when it doesn't

Good for

  • Keeping or reordering a few columns
  • Selecting by header name or position
  • Dropping columns you do not need

Not the best choice for

  • Filtering rows (this keeps every row)
  • Renaming columns
  • Combining or computing new columns

To filter rows or compute values, use a spreadsheet. To view the result as a table, use the CSV viewer.

Frequently asked questions

Can I pick columns by name or by number?
Both. Each entry is matched against the header names first; if it is not a header, it is read as a 1-based column number.
Are columns numbered from 0 or 1?
From 1. The first column is 1, the second is 2, and so on.
What happens to a column I misspell?
It is silently dropped, with no error, so check the output contains every column you expected.
Can I reorder columns?
Yes. The columns come out in the order you list them, so you can rearrange as well as filter.
Does it keep the header?
Yes. The header row is kept at the top of the output.
Does it filter rows too?
No. Every row is kept; only the columns are selected.
Can I mix names and numbers?
Yes. You can list some columns by name and others by 1-based number in the same comma-separated list.
Does it handle quoted fields?
Yes. A value containing a comma stays as one column rather than being split.
What if a number is out of range?
It is skipped, the same as an unmatched name.
What format do I get?
A CSV (.csv) of just the chosen columns.
Is my data uploaded?
No. Your browser does the extraction and sends the file nowhere.
How do I view the result as a table?
Use the CSV viewer to see the trimmed CSV as a table.

References

Selects the columns you name, by header text or 1-based position, and outputs a CSV of just those, in the order you list them. Columns it cannot match are skipped. The header row is kept. Runs in your browser.

Popular

CSV to JSON Converter

CSV rows become a JSON array, keyed by the header row.

DocumentOpen
Popular

JSON to CSV Converter

Flatten a JSON array of objects into CSV columns.

DocumentOpen
Trending

Markdown to HTML

Turn everyday Markdown into clean HTML in your browser.

DocumentOpen

CSV to Excel Converter

Pasted CSV becomes a real .xlsx, with leading zeros kept.

DocumentOpen

Excel to CSV Converter

Pull the first sheet of a workbook out as plain CSV.

DocumentOpen

Excel to JSON Converter

Each spreadsheet row becomes a JSON object keyed by the header.

DocumentOpen

Back to the CSV Column Extractor

The file never leaves your computer, and you don't need an account.