Home Text Tools Text Column Extractor
📋
Text

Text Column Extractor

Extract specific columns from CSV, TSV, pipe-delimited, or space-separated text. Supports column ranges (1-3), multiple selections (1,3,5), column reordering, output delimiter change, whitespace trimming, and a live preview table.

🔒 Browser-based📊 CSV / TSV / Pipe🔢 Ranges & reorder👁 Live table preview
Switch Tool:
🔒 100% Private — All processing runs in your browser. Your text is never sent to any server.
1-indexed. Use , for list, - for range. Order = output order.

📖How to Use the Text Column Extractor

  1. 1
    Paste your delimited data

    Paste CSV, TSV, pipe-delimited, space-separated, or any structured text where each line has the same number of columns. The tool auto-detects the most likely delimiter and shows a live table preview.

  2. 2
    Choose columns and options

    Enter column numbers to extract (e.g. 1,3 for first and third, or 2-4 for a range, or 3,1,2 to reorder). Select your input delimiter and choose the output delimiter. Enable trim whitespace to clean up extra spaces around values.

  3. 3
    Extract and copy

    The extracted columns appear instantly in the output box. Copy to clipboard or download as a .csv or .txt file. A row count and column count summary is displayed for verification.

💡Quick Reference

Column specExtracts
1Column 1 only
1,3,5Columns 1, 3 and 5
2-4Columns 2, 3 and 4
3,1,2Reordered: 3→1→2
1-3,6Cols 1,2,3 and 6

Frequently Asked Questions

What delimiters does the tool support?

The tool supports comma (CSV), tab (TSV), pipe (|), semicolon (;), colon (:), space (any whitespace), and custom delimiter. The space delimiter treats any sequence of whitespace as a single separator — useful for parsing command-line output like ls -l or ps aux. The auto-detect feature checks common delimiters and picks the one that produces the most consistent column count.

How do I specify columns to extract?

Use a comma-separated list of column numbers (1-indexed). Examples: "1" extracts column 1. "1,3,5" extracts columns 1, 3, and 5. "2-4" extracts columns 2, 3, and 4 (range). "3,1,2" extracts columns 3, 1, and 2 — in that order, effectively reordering the columns.

Can I use this to reorder columns?

Yes. Specify columns in the order you want them in the output. For example, if your data has columns Name, Age, Email and you want Email, Name, that is column specification "3,1". The output columns appear in the order you specify, not in the source order.

Can I change the output delimiter?

Yes. Extract columns from a CSV and output as TSV, or extract from pipe-delimited data and output as comma-separated. This is useful for format conversion: take a CSV file, extract the columns you need, and output them in a different format ready for import into another system.

What happens if a line has fewer columns than requested?

Lines with fewer columns than the highest requested column number return empty strings for the missing columns. The line is not skipped — it appears in the output with empty values, preserving the row structure. You can choose to skip incomplete lines using the Skip rows with missing columns option.

How does this compare to using Excel or Google Sheets?

For a quick one-off extraction, this tool is significantly faster than opening a spreadsheet application, importing the data, selecting columns, and exporting. For automated or repeated extractions, command-line tools like awk, cut, or csvkit are better choices. This tool bridges the gap for simple column extraction tasks.