CSV column extractor — keep, reorder, rename or remove columns

List the columns you want by name or number, in the order you want them, and the tool writes a new CSV with only those columns, renamed if you add "as New name", or with the listed columns removed instead.

Live demo · real result from this tool

Drop your file here

or paste with Ctrl+V · nothing is uploaded

Or paste CSV / TSV in the box below. Excel files (.xlsx) use their first sheet.

Names or numbers, separated by commas or new lines. Rename with “as”: email as Email address.
Mode

Loading the tool…

Processed on your device — nothing is uploaded.

How to use the CSV column extractor

  1. Press Choose a file to load a CSV, TSV or Excel file, or paste data into CSV data.
  2. Check the Delimiter and First row is a header settings.
  3. In Columns to keep, in order, type column names or numbers separated by commas or new lines. Add “as” to rename, for example email as Email address.
  4. Choose the Mode: Keep these or Remove these.
  5. Copy the Extracted CSV or press Download to save <name>-columns.csv.

What it does and when to use it

Exports usually contain more fields than the next system needs. A shop export may have 40 columns when the mailing tool only wants name and email; an HR file may include salaries that should not be shared; an import template may expect the columns in a fixed order with fixed names. The extractor handles all three jobs at once: choose, reorder and rename.

Remove these is quicker when you want almost everything except a few fields, such as an internal id or a private note. Afterwards you can remove duplicate rows on the columns that are left, or split the file into upload-sized parts. To flip rows and columns instead, use the CSV transposer.

How it works

The file is parsed in your browser, Excel files from their first sheet. Each entry in your list is read as column or column as new name. The column is found by exact name, then by name ignoring case and spacing, then by number. In Keep mode the new file contains the found columns in the order you listed them, and the same column may be listed twice. In Remove mode it contains every column except the listed ones, in their original order.

The output uses the same delimiter as the input. Values are copied exactly, and a field is quoted only when it contains the delimiter, a quote or a line break. That is why “Okafor, Chidi” stays in quotes in the examples below.

Worked examples

The sample is a customer list with the columns id, name, email, city, signup_date, plan and monthly_spend.

Keep three, rename one (the default). name, email as Email address, plan gives:

name,Email address,plan
Asha Verma,asha@example.com,Pro
Ben Carter,ben@example.com,Free
"Okafor, Chidi",chidi@example.com,Team

Remove by number. 1, 7 with Remove these drops id and monthly_spend, leaving name,email,city,signup_date,plan.

A typo in the list. city, monthly_spend as Spend (USD) and phone on separate lines. The file has no phone column, so the tool warns Not found and skipped: “phone”. and still writes city,Spend (USD) with rows such as Pune,49.

Limits and tips

  • A name containing a comma, or the word “as” between spaces, can be misread. Use its column number instead.
  • Values are not changed. To trim stray spaces as well, run the CSV cleaner first.

Frequently asked questions

Can I refer to columns by number?
Yes. Column 1 is the first column. The tool lists every column with its number under the result, for example "1 id · 2 name · 3 email", so you can copy the numbers you need. Numbers are handy when names are long or contain commas.
Are column names case-sensitive?
Not strictly. An exact match is tried first, then a match that ignores upper and lower case and extra spaces. So "Email", "email" and " email " all find a column called email.
How do I rename a column?
Add "as" and the new name after it, such as "email as Email address". Renaming only works in Keep mode; in Remove mode the remaining columns keep their names.
What happens if I mistype a column name?
In Keep mode, unknown names are skipped with a warning and the other columns are still extracted. If none of the names match, you get a message instead of an empty file.
Does it work without a header row?
Yes. Untick "First row is a header" and use column numbers. The output then has no header row either.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close