Text column extractor

What is a Text Column Extractor?

Often you only need one field from a block of delimited text: the email column from a CSV export, the IP addresses from a log, the IDs from a report. This tool extracts a single column from text split by commas, tabs, pipes, spaces or any delimiter you choose, much like the Unix cut or awk commands but without the command line.

How to use it

  1. Paste the text, one record per line.
  2. Choose the delimiter.
  3. Enter the column number to extract (the first column is 1).
  4. Copy the extracted values, one per line.

Example

Input with a comma delimiter, extracting column 2:

1001,[email protected],Pune
1002,[email protected],Leeds
1003,[email protected],Taipei

Output:

[email protected]
[email protected]
[email protected]

Command-line equivalents

  • cut -d',' -f2 file.csv
  • awk -F'\t' '{print $3}' file.tsv for the third tab-separated column.
  • awk '{print $1}' access.log for the first space-separated field, such as the client IP in web server logs.

Watch out for

  • Quoted CSV fields containing commas, like an address with a comma inside quotes. A simple split will shift the columns; convert the CSV to JSON with a proper parser for such files.
  • Repeated spaces in aligned output: splitting on a single space produces empty columns. Collapse whitespace first.
  • Header rows: remove the first line if you do not want the column name in the result.

Frequently Asked Questions

Is this the same as the Unix cut command?

It does the same job, extracting one field per line using a delimiter, but runs in your browser without a terminal.

Why are my columns shifted?

Some rows probably contain the delimiter inside a quoted value or have repeated spaces. Use a proper CSV parser for quoted fields.

Is the first column 0 or 1?

Columns are numbered from 1, like cut and awk.

Can I use tab as the delimiter?

Yes. Choose tab to extract columns from TSV files or data copied from spreadsheets.