CSV Column Extractor
Open or paste a CSV, choose its columns, filter its rows, and download the result.
Everything runs in your browser; nothing is uploaded. Ctrl + Enter updates the result.
Columns
Tick the columns to keep. The output follows the order of this list.
The columns appear here when you paste or open a CSV.
Filter rows
A condition with an empty value is skipped; use Is empty to find blank cells. Greater than and less than compare numbers such as 1,200, 12,5, 6.35% or $40; cells that aren't numbers never match them.
Output options
Duplicates are compared on the columns you keep. Trim removes spaces at both ends of every value before filtering.
Result
The result appears here.
How to extract columns from a CSV
Paste the CSV or press Open file to load a .csv, .tsv or .txt file; it is read by your browser and never uploaded. The delimiter (comma, semicolon, tab or pipe) is detected and shown under the Delimiter menu, where you can override it. Untick First row is a header if the first line is data; the columns are then called Column 1, Column 2 and so on.
Under Columns, untick what you don't need and use Move up and Move down to set the output order. The preview shows the first 100 rows with counts of rows in, rows out and columns kept; Copy and Download .csv include every row. Paste another export with the same header later and your column choice and order are kept.
Filtering rows
Press Add condition and pick a column, an operator and a value. The text operators are equals, does not equal, contains, does not contain, starts with, ends with and matches regex (JavaScript syntax). Is empty and is not empty need no value; a cell with only spaces counts as empty. Greater than and less than compare numbers, reading 1,200, 1.234,5, 12,50, 6.35% and $40; a cell that isn't a number never matches.
Match all conditions keeps rows that pass every condition, Match any condition keeps rows that pass at least one, and Ignore case is on by default. A condition you haven't filled in is skipped, and one that can't work, such as an invalid regex, is flagged and skipped.
Output options
The output keeps the input delimiter unless you pick another. Values are quoted only when needed (they contain the delimiter, a quote or a line break, or start or end with a space); Every field suits strict importers. Line endings are LF, or CRLF for Windows tools that expect it. Remove duplicate rows compares rows after column selection, so keeping one column gives you its distinct values. Trim values removes spaces at both ends of every value before filters run.
Examples
All four examples start from this input:
Query,Page,Clicks
best serp api,/serp-api,1204
"serp api pricing, compared",/pricing,532
bing search api,/bing-api,0 | Settings | Output |
|---|---|
| Keep Clicks and Query, in that order | Clicks,Query 1204,best serp api 532,"serp api pricing, compared" 0,bing search api |
| Keep Query; condition Clicks greater than 100 | Query best serp api "serp api pricing, compared" |
| Keep Page; conditions Query contains pricing, Clicks equals 0; Match any condition | Page /pricing /bing-api |
| Keep Query and Clicks; output delimiter semicolon | Query;Clicks best serp api;1204 serp api pricing, compared;532 bing search api;0 |
"serp api pricing, compared" stays one value because it is quoted. In the last example the quotes are dropped, since the comma is no longer the delimiter.
The CSV rules that trip people up
- Commas inside values. A field that contains the delimiter must be wrapped in double quotes, or it splits into too many columns.
- Quotes inside values. Inside a quoted field, a quote is written twice:
"what is a ""SERP"""meanswhat is a "SERP". - Line breaks inside values. A quoted field can span several lines, so a file can have more lines than rows. Problems are reported with the row number and the line where that row starts.
- Semicolons from European Excel. Where the comma is the decimal separator, as in Germany, France or Spain, Excel saves CSV with semicolons and writes numbers like 12,50. When comma and semicolon split the rows equally well, auto-detect picks semicolon, because decimal commas in every row are common and semicolons in every row are not.
- The byte order mark. Excel's "CSV UTF-8" format starts the file with an invisible BOM. The tool strips it, so the first column is not named "Query". Tick Add BOM for Excel when you download, so Excel on Windows reads accented characters correctly. Files that aren't valid UTF-8, common with Excel's plain "CSV (Comma delimited)" format, are read as Windows-1252.
Broken input doesn't stop the tool: an unclosed quote is reported with its row and read as a plain character, so
the rest still parses. Rows with a different number of fields are kept and counted in a warning. A first line
such as
sep=;, which some Excel files carry, sets the delimiter and is removed.
Limits
Values stay text, so leading zeros, long IDs and dates come out exactly as they went in. Files up to 50 MB can be opened. Over 2 MB, the result updates when you press Apply rather than after every change, and the file is not copied into the text box. In testing, a 100,000-row, 12 MB file was parsed, filtered and written back out in under a second.
Common uses
- Trim a Google Search Console export to the query and clicks columns before sharing it, or keep only rows where Position is less than 11.
- Cut an Ahrefs or Semrush keyword export down to keyword and volume, with volume greater than 100.
- Keep Address and Status Code from a Screaming Frog crawl, with Status Code does not equal 200, to send a developer every URL that doesn't return 200.
- Prepare an import: reorder columns to match the template and switch to the delimiter the importer expects.
For a plain list, Remove Duplicate Lines dedupes it and Split Text by Delimiter cuts simple delimited lines with no quoted fields. If an API returns JSON instead of CSV, read it with the JSON Formatter.
Alternatives
In Excel or Google Sheets you can delete columns and filter, but opening the file usually converts values:
leading zeros disappear and long numbers can turn into scientific notation. On the command line,
csvcut -c Query,Clicks export.csv from csvkit selects columns correctly and csvgrep
filters rows. Plain cut -d, -f1,3 works for simple files, but it splits at every comma, including
those inside quotes, so it scrambles the "serp api pricing, compared" row above.
Frequently asked questions
How do I extract specific columns from a CSV file?
Paste the CSV or open the file, then untick the columns you don't want in the Columns list and put the rest in order with Move up and Move down. Download the result as a new CSV or copy it.
Is my CSV uploaded to a server?
No. The file is read and processed by JavaScript in your browser, and nothing is sent anywhere. Inputs under 200 KB are kept in your browser's local storage so they are still there when you come back.
Why is my CSV separated by semicolons instead of commas?
Excel uses the list separator from your regional settings, and in countries where the comma is the decimal separator that is a semicolon. The tool detects semicolons automatically, and you can switch the output to commas.
How do I filter CSV rows by a number, such as clicks over 100?
Add a condition on that column with Greater than and the value 100. Thousands separators, decimal commas, percent signs and currency symbols are understood, and cells that aren't numbers are left out.
Can I remove duplicate rows from a CSV?
Yes. Tick Remove duplicate rows. Rows are compared on the columns you keep, so keeping a single column gives you its unique values.
Why do accented characters look wrong when I open the result in Excel?
Excel on Windows reads a CSV without a byte order mark in the system's legacy encoding. Tick Add BOM for Excel before downloading so Excel reads the file as UTF-8.