文本列转 CSV

文本列转 CSV 转换器

将列对齐文本(即值通过空格整齐排列在列中的文本)转换为干净的 CSV。工具自动找到列边界(或由您设置宽度),预览分割结果,并导出 CSV。

免费无需注册在浏览器中运行兼容 Excel
开始转换
文本列转 CSV 转换器
粘贴或上传文本以进行转换。
输入 — 粘贴或上传
Drag a file here, or browse (.txt, .csv, .tsv, .json)
输出
输入类型
输入分隔符
列宽
输出为
自定义分隔符
纯文本样式
引号处理
换行符

此处将实时预览数据表格。

Best for aligned, tabular text; leave widths blank to auto-detect the columns.

广告
功能一览

Convert aligned text columns into CSV

Some text is not delimited by a character at all — it is aligned into columns by spaces, like a console table or a monospaced report. To convert text columns to CSV, the tool reads the column positions and turns each aligned field into a CSV cell.

Paste or upload the text. With column widths left blank, it detects boundaries by finding the spacing gaps shared across every row; or set exact widths for tricky layouts. The live preview shows the columns so you can confirm the split before exporting.

If your data is actually separated by tabs or pipes, use delimited text to CSV. For strict fixed-length records, see fixed width to CSV.

分步指南

How to use it

粘贴或上传

Add your text or drop a file — it is read locally in your browser, never uploaded.

Preview & adjust

Check the live table and the row / column counts, then tweak the delimiter or options if a column looks off.

Copy or download

Grab the result with Copy or Download. You can reopen recent conversions from this device too.

示例

Input and output example

Aligned column text is split at the column gaps into CSV.

Input
id    name      role
01    Ada       Designer
02    Lin       Engineer
输出
id,name,role
01,Ada,Designer
02,Lin,Engineer
Details

Reading columns the way you see them

对齐文本对人类易读,但对简单分割器来说很棘手 — 以下是处理方式。

Detecting column gaps

The parser looks for character positions that are blank in every row and treats those as the boundaries between columns. This matches how your eye separates an aligned table, so most console output and reports convert without any configuration.

When auto-detection needs help

If a column can be empty, or two columns touch with no gap, type explicit widths (for example 6 10 12). A trailing 0 grabs whatever remains on the line, which is handy for a final free-text column.

Trimming padding

Each extracted value is trimmed, so the padding that aligned the columns does not end up inside your data.

Verifying the result

The column-count indicator flags rows that did not split into the expected number of fields, making misalignment obvious before you download.

Good to know

When text is a table in disguise

Plenty of useful data arrives as text that is really a table — the output of a command-line tool, a copied report, or a log formatted into neat columns. The information is all there; it just needs structure. Treating those aligned columns as fields, rather than splitting on a single character, is what turns the text into something a spreadsheet or database can use. Auto-detection handles the common case by reading the spacing gaps shared across rows, while explicit widths cover layouts where a column can be blank or two columns touch. Either way, the preview is your safety net: if a width is wrong, the misalignment is obvious, so you can fix it before the CSV ever leaves your browser.

常见问题

Text Columns to CSV Converter — FAQ

What counts as column text?

Text whose values line up in columns by spacing, such as console output or a monospaced report.

How are column boundaries found?

Positions that are blank in every row are treated as gaps between columns; you can also set widths manually.

What if columns touch with no space?

Enter explicit widths — auto-detection needs at least one space between columns.

Is the padding removed?

Yes, each value is trimmed so alignment spaces are not kept.

Related tasks

Converting lists and columns to CSV

此工具处理人们以不同名称搜索的多项相关任务。

List to CSV

If you have a plain list — one item per line — paste it in and the tool creates a single-column CSV. To create multiple columns from a list, separate your items with a consistent delimiter (tab, pipe or comma) and the auto-detect picks it up immediately. For a dedicated list converter, this page and the text to CSV tool both work well.

Column to CSV

Space-aligned or tab-aligned columns from a report, terminal output or legacy export can be tricky — commas inside values break naive splits. Set the input to 固定宽度 and type the column widths (e.g. 10 8 12), and the parser slices every row at the right positions without touching the cell contents. For tab-separated columns, leave input on Auto-detect.

Turning rows into columns (transposing)

If your data has items that should be column headers rather than row values, download the CSV first and use the 交换 option or a spreadsheet transpose function. The converter itself works row-by-row, so transposition is a post-step.