UTILS.
Private by default
|c|

CSV Column Extractor

Keep and reorder CSV columns by index or header name.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
output

About this tool

Pick and reorder the columns of a CSV by index or header name, entirely in your browser.

Names are matched against the first row, ignoring case and outer spaces, and that row is kept in the output. A token made only of digits is always an index, so a header such as 2024 cannot be chosen by name; neither can a header containing a comma, since the list is split at commas. Names that match nothing are skipped. Quoted fields, a byte-order mark and Windows line endings are handled, and fields are re-quoted only when needed. An index past the end of a row gives an empty cell.

Frequently asked questions

How do I choose columns?
Enter a comma-separated list of zero-based indexes (like 0,2) or header names (like name,city) in the order you want them.
Can I reorder columns?
Yes. The output columns follow the exact order you list, so you can rearrange or drop columns at once.
Why was one of my columns ignored?
Its name did not match a header in the first row. Numbers are always read as positions, with the first column being 0.
Can I drop the header row?
No. The first row is always output with the chosen columns.

More tools