Text Column Extractor
Paste text that has columns, choose what separates them and type the columns to keep, such as 2 or 1,3 or 2-4. The result is a list with one value per line, or the columns joined with a comma, a tab or any text you like. You can leave out the header row, keep a comma inside a quoted field and swap columns by typing them in a new order. Everything runs in your browser.
Columns are counted from 1 and kept in the order you type them. Use a range such as 2-4, 3- for the third to the last, or the word last.
3 rows, up to 3 columns, 3 values kept
Each line is cut into fields at the separator you pick. A run of spaces and tabs counts as one separator in the Spaces choice, as it does in awk. With double quotes on, a field such as "Paris, France" stays whole, a doubled quote inside it stands for one quote, and a quoted field may run over several lines. A row that has fewer fields than a column you ask for gives an empty value, and the summary counts those rows. The columns are written in the order you type them, so 3,1 swaps two columns. When you put the values on one line, a value that holds the separator is quoted again. Everything runs in your browser and nothing you paste is uploaded.
Related Tools
[5 suggestions]CSV to JSON Converter
Convert CSV data into a JSON array of objects with proper field parsing and quoting.
Developer & WebText Table Generator: Make an ASCII or Unicode Table from CSV
Turn comma, tab, pipe or space separated rows into a table drawn with characters: an ASCII grid, a Unicode box, psql style or plain columns, with alignment and padding.
Format ConversionSort Lines
Sort lines alphabetically (A-Z or Z-A) or by character length with one click.
Line & ListsRemove Duplicate Lines
Strip repeated lines from any block of text while preserving initial ordering.
Line & ListsList Comparison Tool: Compare Two Lists Online
Compare two lists to see the items only in the first, only in the second, in both and in either, ignoring case and spaces if you want.
Line & ListsAbout the Text Column Extractor
Each line is cut into fields at the separator you pick, and the columns you name are kept in the order you name them. For the text name,city,age with the rows Ada,London,36 and Lin,"Paris, France",41, asking for column 2 and leaving out the header gives London and Paris, France, because the double quotes keep the comma inside the field. Asking for 3,1 gives 36 and Ada on one line, so a swap is just a different order. A range such as 2-3 keeps a run of columns, 2- keeps everything from the second column on, and the word last keeps the final field of every row even when rows have different lengths. A run of spaces and tabs counts as one separator in the Spaces choice, as it does in awk. The Unix cut command writes its output in the order it meets the fields in the file, so cut cannot reorder columns, and it does not know about quoted fields. A row that has fewer fields than a column you ask for gives an empty value, and the summary counts those rows so you can see a ragged file. Spaces around each value are trimmed unless you turn that off.
How do I extract one column from a CSV file?▾
Paste the text, keep the separator on Comma, type the column number in Columns to keep and choose One per line. Tick the header box to leave out the first row. The result is a list you can copy.
Can I change the order of the columns?▾
Yes. The columns are written in the order you type them, so 3,1 puts the third column first. The Unix cut command cannot do this because it writes fields in the order they appear in the file.
What happens to a comma inside quotes?▾
With double quotes on, a field such as "Paris, France" stays one value, and a doubled quote inside it stands for one quote. Turn the option off if your text uses quote marks as plain characters.
What if some rows have fewer columns?▾
The value for a missing column is empty, and the summary under the result tells you how many rows were short. Leave out empty values to drop them from a one per line list.
Is my text uploaded?▾
No. The columns are extracted in your browser and nothing you paste is sent anywhere.