CSV Column Extractor: Select and Reorder

CSV column extractor keeps the fields you choose in your chosen order and exports a smaller comma-separated file.

Comma-delimited UTF-8 CSV only; up to 100,000 characters, 1,000 records including header and 100 columns. Files are read in this page; no file upload or account is needed. This page loads analytics scripts, so avoid confidential source text.

Columns in output order

Select by position, then move chosen columns to set output order.

Output preserves parsed cell text, not original quoting, BOM or record separators. Blank physical records are padded to first-record width; ragged explicit rows and malformed quotes stop export. See RFC 4180 format guidance.

CSV export preserves cell text; it does not make formula-like cells safe for spreadsheet software. Review cells before opening in a spreadsheet. OWASP CSV Injection guidance.

Next: deduplicate CSV rows, convert selected CSV to JSON or convert CSV to HTML table.

Why extract CSV columns by position?

Choose useful fields

Remove unneeded columns from a wide export and keep a smaller CSV for the next step. A twenty-column report often reduces to an identifier and two fields that matter.

Set output order

Check and move selected fields without changing original rows. Reordering here replaces a manual cut and paste that easily shifts one cell out of line.

Keep duplicate headers distinct

Column numbers identify two fields with the same name or no header name at all, so an export with two id columns stays unambiguous.

What CSV column extraction preserves

The parser reads records and cells before selection. A comma or line break inside a properly quoted field belongs to that cell, so a multiline address does not become a new record. The selector chooses whole columns by position across header and data rows, and the interface labels positions from column 1, so a third field stays column 3 after one is removed.

Suppose header is id,id,blank and you request column 3 followed by column 1. Output starts with blank header and first id in that order. Other fields are omitted. Export quoting may change while parsed cell values remain the same, so compare cells rather than punctuation when checking a result.

CSV rules to know

  • Quoted cellsEscaped double quotes, commas and embedded LF or CRLF stay inside their field. A Windows line break inside quotes survives as CRLF, not as two records.
  • Strict shapeEvery record must match first record width; ragged explicit rows cause an error rather than silent loss.
  • Header choiceWith header on, record one is header. With it off, that record is data and positions remain identifiers. A first row whose text repeats like a data row is still treated by the mode you chose.
  • Byte order markA leading byte order mark from spreadsheet exports is dropped before parsing, so the first header name does not arrive with an invisible prefix that breaks later matching.
  • Trailing newlineOne final line break ends the last record and adds nothing. An extra empty line is a real blank record, which the strict parser pads to full width, so a stray blank row is visible in the output instead of vanishing.
  • Header equal to dataA data row that happens to repeat the header text is ordinary data. With header on, it exports after the header row, and selecting positions keeps both rows intact.

Common Use Cases

Reduce a report

Keep an identifier and fields needed for review instead of sharing an entire export with names, notes and internal codes.

Prepare an import

Arrange fields in order expected by another CSV workflow, so the receiving tool finds each value in the position it documents.

Work with unnamed exports

Select blank or repeated header by its position instead of renaming source data that another system may read again.

How to select and reorder CSV columns

1

Add comma-separated source

Paste CSV or open a UTF-8 .csv file.

2

Read columns and choose fields

Choose whether record one is header, read columns, then check fields by position.

3

Arrange and preview

Move selected columns into output order and inspect resulting records.

4

Copy or download

Export current CSV, or fix reported record and run extraction again.

Selection without hidden row changes

Same records

Only columns change; data records keep original order and count, including blank ones the strict parser padded.

Errors before export

Malformed quotes and ragged rows stop output rather than dropping cells quietly.

Current selection

Editing source, header mode or order invalidates previous result, so the file you copy matches the checkboxes on screen.

Before moving CSV on

  • •Check positions: Repeated names are not unique identifiers; use displayed column numbers.
  • •Review formulas: CSV quoting does not stop spreadsheet software interpreting formula-like cells. The warning link explains the risk; this tool does not prefix cells for you.
  • •Check next format: Use CSV to JSON only after confirming selected fields are what you need. A trim here is cheaper than repairing a downstream import.
  • •Mind the delimiter: This page reads commas only. A semicolon or tab separated file arrives as one wide column, so convert it first instead of assuming the parse failed.

Make a smaller CSV

Paste or open CSV above and select fields by position. Header mode decides whether the first record is a label or data.

Arrange output columns, inspect result and export current file.

Related tools

Frequently Asked Questions

Can I reorder columns as well as extract them?

Yes. Checked fields appear in output order. Move them with named controls before exporting.

What happens with duplicate or blank headers?

They remain separate positions, such as columns 1 and 2 with the same name. Header text is never used as a unique key.

Are quoted multiline cells supported?

Yes. Properly quoted commas, escaped quotes and embedded newlines remain within one cell. Malformed quotes stop export.

Does the tool change my original file?

No source file is overwritten. New CSV is created from selection; quoting and line endings may be normalized.