Boneyard Tools

CSV Column Extractor

Paste CSV and choose the columns you want by header name or by 1-based position. Keep mode outputs them in the exact order you list, so you can slice and reorder in one step, while drop mode removes the columns you name and leaves the rest untouched. The parser follows RFC 4180, so quoted fields that contain commas, quotes or line breaks are read and re-quoted correctly.

How to extract CSV columns

  1. Paste your CSV into the 'CSV input' box.
  2. Tick or clear 'First row is header' to match your data.
  3. In the Columns field, list the columns by name or 1-based number, separated by commas, in the order you want.
  4. Set Mode to Keep to output only those columns, or Drop to remove them.
  5. Read the extracted CSV in the Result box and click Copy.

Examples

Keep and reorder by name

id,name,email\n1,Ada,a@x.io
name,id\r\nAda,1

Keep columns 1 and 3 by position

a,b,c\n1,2,3
a,c\r\n1,3

Drop the email column, keep the rest

id,name,email\n1,Ada,ada@x.io\n2,Bob,bob@x.io
id,name\r\n1,Ada\r\n2,Bob

Frequently asked questions

Can I select columns by name or only by number?

Both. When the first row is a header you can list column names, and you can always use 1-based positions where 1 is the leftmost column. Mixing names and numbers in the same list works, so 'name, 3' is valid.

Will it keep the order I list the columns in?

Yes. In keep mode the output columns follow the exact order you type, so listing 'email, id, name' reorders the file into that sequence. You can even repeat a column to duplicate it in the output.

Does it handle commas and quotes inside fields?

Yes. The parser follows RFC 4180, so a quoted field such as "Smith, Jane" is read as one cell, embedded double quotes written as two quotes are decoded, and any field that needs quoting is re-quoted in the output.

What does drop mode do?

Drop removes every column you list and keeps the remaining columns in their original left to right order. It is handy for stripping a few sensitive or unused fields without retyping the ones you want to keep.

What if my CSV has no header row?

Clear the 'First row is header' checkbox. With no header you must address columns by their 1-based position, and the first data row is treated as ordinary data rather than names.

What happens if I name a column that does not exist?

The tool shows an inline error such as an unknown column name or an out of range index instead of guessing. Fix the name or number and the result reappears immediately.

What line endings does the output use?

Output rows are joined with CRLF, the line ending RFC 4180 specifies, regardless of whether your input used CRLF, CR or LF. Input in any of those styles is parsed correctly.

Can it handle large CSV files?

There is no hard row limit. Everything runs in your browser, so the practical ceiling is your device memory, and typical spreadsheets with thousands of rows process instantly.

Is my CSV uploaded?

No. Parsing and column selection run entirely in your browser, so your data never leaves your device and nothing is stored on a server.

Learn more

Related tools