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
- Paste your CSV into the 'CSV input' box.
- Tick or clear 'First row is header' to match your data.
- In the Columns field, list the columns by name or 1-based number, separated by commas, in the order you want.
- Set Mode to Keep to output only those columns, or Drop to remove them.
- 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
- How to select, reorder and drop CSV columns
Pick CSV columns by name or position, reorder them in one pass, and drop unwanted fields while keeping quoted values intact.
Related tools
CSV to JSON
Convert CSV to JSON online. Turn spreadsheet rows into clean JSON objects or arrays, with smart number and boolean typing. Free tier plus API.
JSON to CSV
Convert JSON to CSV online. Paste an array of objects and get clean, spreadsheet-ready CSV with the right headers. Runs in your browser.
List Comparison
Compare two lists online to find items only in A, only in B, in both, or the combined union. Optional case-insensitive matching. Free and private.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
ASCII Table
Full ASCII table for all 128 codes with decimal, hex, octal and binary values, character names and descriptions. Search by code, hex or character.
Aspect Ratio Box Generator
Generate CSS for a responsive aspect-ratio container. Use the modern aspect-ratio property or the padding-top fallback, then copy the ready code.