🔍

首页Home › 开发工具Developer Tools

📄 文本转 TSVConvert Text to TSV

把按空格、逗号、分号或竖线分隔的文本转成 TSV(制表符分隔),支持双引号字段,列数与表头不一致的行会带行号提示。本地处理。Convert space, comma, semicolon or pipe separated text into TSV (tab-separated), honouring double-quoted fields and flagging rows whose field count differs from the header. Processed locally.

使用说明与常见问题How-to & FAQ

「文本转 TSV」是什么?What is the Convert Text to TSV tool?

把按空格、逗号、分号或竖线分隔的文本转成 TSV(制表符分隔),支持双引号字段,列数与表头不一致的行会带行号提示。本地处理。Convert space, comma, semicolon or pipe separated text into TSV (tab-separated), honouring double-quoted fields and flagging rows whose field count differs from the header. Processed locally.

如何使用「文本转 TSV」?How do I use the Convert Text to TSV tool?

在「文本转 TSV」中,把内容粘贴或输入到上方输入框,按需设置「源分隔」,结果会实时显示在下方,点击「复制结果」即可复制。In the Convert Text to TSV: Paste or type into the input box, adjust "Source sep"; the result appears below instantly — click "Copy result" to copy it.

双引号怎么处理?How are double quotes handled?

逗号、分号、竖线模式按 RFC 4180 的方式处理:用双引号括起的字段可以包含分隔符和换行,字段内的 "" 表示一个双引号,输出时去掉外层引号。空格模式下 "..." 把多个词组成一个字段,例如 李四 "q x" 200 得到 3 个字段。引号不配对时会报出行号。In comma, semicolon and pipe modes quotes work as in RFC 4180: a field wrapped in double quotes may contain the separator and line breaks, "" inside it stands for one quote, and the outer quotes are removed. In space mode "..." groups several words into one field, so a "q x" 200 gives three fields. An unmatched quote is reported with its line number.

字段数不一致会怎样?What if rows have different field counts?

照常转换,但会在结果下方用红字列出字段数与第一行(表头)不同的行号和字段数,通常是值里含有分隔符却没加引号。The text is still converted, but the lines whose field count differs from the first line (the header) are listed in red below the result with their field counts; usually a value contains the separator without quotes.

自动模式怎么选分隔符?How does Auto choose the separator?

对整段输入只选一次:有制表符就按制表符,否则引号外有逗号就按逗号,否则按空白。所选分隔符在输入中根本没有出现时会提示,而不是悄悄原样输出。Once for the whole input: tabs if there are any, otherwise commas if there is a comma outside quotes, otherwise whitespace. If the chosen separator never occurs you get a note instead of the text being passed through silently.

字段里的制表符呢?What about tabs inside fields?

TSV 用制表符分隔,所以字段里的制表符和(引号内的)换行会替换为空格,并提示替换了多少个字段。TSV uses tabs as separators, so tabs and quoted line breaks inside a field are replaced by spaces, with a note saying how many fields were changed.

输入和输出是什么样的?What does the input and output look like?

例如在「文本转 TSV」中输入 a b c ⏎ 1 2 3,「源分隔」设为 空格,输出为:a ⇥ b ⇥ c ⏎ 1 ⇥ 2 ⇥ 3(⏎ 表示换行,⇥ 表示制表符)。For example, the Convert Text to TSV turns the input a b c ⏎ 1 2 3, "Source sep" set to Space into: a ⇥ b ⇥ c ⏎ 1 ⇥ 2 ⇥ 3 (⏎ marks a line break, ⇥ marks a tab).

有哪些选项可以调整?What options can I adjust?

「文本转 TSV」的设置:「源分隔」可选 自动、空格、逗号、分号、竖线(默认 自动)。每次生成结果都按当前设置处理。Settings in the Convert Text to TSV — "Source sep": Auto, Space, Comma, Semicolon, Pipe (default Auto). The result always uses the current settings.

代码或数据会被上传吗?Is my code or data uploaded?

不会。「文本转 TSV」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The Convert Text to TSV runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.

「文本转 TSV」免费吗?需要注册吗?Is the Convert Text to TSV free? Do I need an account?

「文本转 TSV」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Convert Text to TSV is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

📊 TSV 分析Analyze TSV📄 CSV 转文本(按分隔符拆成纯文本)Convert CSV to Text📤 提取 TSV 列Extract TSV Columns🔍 查找不完整 TSV 行Find Incomplete TSV Values✂️ TSV 去除单元格首尾空格Trim TSV Columns🔓 TSV URL 解码URL-Decode TSV🔗 TSV URL 编码URL-Encode TSV✅ 校验 TSVValidate TSV📡 波特率计算器Baud Rate Calculator🧾 TOML 生成器TOML Generator🔎 正则表达式测试Regexp Tester🧩 微信小程序组件说明表WeChat Mini Program Components

← 全部工具All tools