Extract text columns
Pull one or more columns out of pasted rows, quotes and all.
Count columns from 1, left to right. Write 1, 3 for two of them, 2-4 for a range, or 3,1 to put them back in a different order. A value wrapped in double quotes is kept whole even when it contains a comma, and is quoted again on the way out when more than one column is kept. Up to 200,000 characters.
Result
Start typing and the result appears here. No button needed.
Extract text columns, without the extra steps.
Pull the columns you need out of pasted rows — a CSV export, a tab-separated copy from a spreadsheet, or the aligned output of a terminal command. Values wrapped in quotes stay whole even when they contain the separator, columns can be reordered on the way out, and rows with fewer columns come back with an empty value rather than silently shifting.
How to use this tool
- 1Paste the rows, one record per line. The workspace reports how many columns it found.
- 2Type the columns you want — 1, 3 for two of them, 2-4 for a range, 3,1 to swap their order — and choose the separator.
- 3Check the result and select Copy result.
When Extract text columns is the right tool
- A CSV export has fourteen columns and you need two of them, without opening a spreadsheet to hide the rest.
- A copied spreadsheet range arrives tab-separated and only the email column is wanted.
- Terminal output is aligned by spaces and the process name and memory figure need pulling out of it.
- Two fields have to swap places before the data goes into another system.
Quotes are the whole difficulty
Splitting a CSV row on every comma is correct until a value contains one, and the moment it does, every column after it shifts by one and the mistake is invisible until something downstream is wrong. A value wrapped in double quotes is treated as a single column here, with a doubled quote inside collapsing to one — the convention every spreadsheet writes. When more than one column is kept, a value containing the separator is quoted again on the way out, so what you copy can be split the same way by whatever reads it next.
The column count comes from your data
Asking for a column number without saying how many exist is a form, not a tool. The workspace reads the pasted rows and reports the widest one, so "Rows have up to 6 columns" is on screen before you choose. Columns are counted from 1, left to right, which is how a person reads a table, and the order you list them in is the order you get — 3,1 swaps two fields in one step rather than needing a second pass.
Short rows keep their place
Real exports are ragged: a trailing field is omitted, a line is truncated, a record was written by a different version of the script. Asking for column 4 in a row that has three produces an empty value in that position and a count of how many times it happened, rather than skipping the row. Keeping one output row per input row is what lets you paste the result back beside the original and have the two line up, which is usually the point of extracting a column at all.
A few quick answers.
Yes. When splitting on commas, semicolons, or tabs, a value in double quotes is kept whole, so "Smith, John" stays one column and the columns after it do not shift. When you keep more than one column, a value containing the separator is quoted again on the way out, so the result is still readable as columns.
Yes — the order you list them in is the order you get. Writing 3,1 gives you the third column followed by the first, which is the quickest way to swap two fields before pasting somewhere else. Repeating a number repeats the column.
They produce an empty value in the missing position, keeping every output row aligned with its input row, and the count of missing values is shown. That matters more than it sounds: silently skipping short rows would misalign the result against the list you pasted.
No. The first row is extracted like any other, which means the header of the columns you kept comes along with them and stays at the top. If you do not want it, delete that line before or after — being explicit about it is simpler than a setting that quietly drops a row of real data when the file has no header.
Choose Spaces as the separator: any run of spaces or tabs ends a column, so the aligned padding that makes such output readable does not create empty columns. There is no quoting convention in that format, so a value containing a space becomes two columns — which is why the other three separators keep their quoting rules.
Every row produces an empty value, so the result is a column of blank lines and the workspace says how many values were missing. That is usually the sign that the separator is wrong rather than the number — a comma-separated file read as tabs looks like one very wide column.