🔍

首页Home › 文本工具Text Tools

🔀 列表分隔符转换(换行 / 逗号 / 分号 / Tab 任意互转)Change List Item Separator

把列表从一种分隔符转换成另一种:换行、逗号、分号、Tab、空格、竖线或任意自定义分隔符之间随意互转,输入分隔符可自动识别并支持 CSV 式双引号;可去掉首尾空格、删除空项,并给每一项加单引号或双引号(例如生成 SQL IN 列表或 JSON 数组内容)。数据在本地处理。Convert a list from one separator to another: new lines, commas, semicolons, tabs, spaces, pipes or any custom separator, in any direction. The input separator can be detected automatically and CSV-style double quotes are honoured. Trim spaces, drop empty items, and wrap each item in single or double quotes (for an SQL IN list or JSON array contents, say). Processed locally.

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

「列表分隔符转换(换行 / 逗号 / 分号 / Tab 任意互转)」是什么?What is the Change List Item Separator tool?

把列表从一种分隔符转换成另一种:换行、逗号、分号、Tab、空格、竖线或任意自定义分隔符之间随意互转,输入分隔符可自动识别并支持 CSV 式双引号;可去掉首尾空格、删除空项,并给每一项加单引号或双引号(例如生成 SQL IN 列表或 JSON 数组内容)。数据在本地处理。Convert a list from one separator to another: new lines, commas, semicolons, tabs, spaces, pipes or any custom separator, in any direction. The input separator can be detected automatically and CSV-style double quotes are honoured. Trim spaces, drop empty items, and wrap each item in single or double quotes (for an SQL IN list or JSON array contents, say). Processed locally.

如何使用「列表分隔符转换(换行 / 逗号 / 分号 / Tab 任意互转)」?How do I use the Change List Item Separator tool?

在「列表分隔符转换(换行 / 逗号 / 分号 / Tab 任意互转)」中,把内容粘贴或输入到上方输入框,按需设置「输入分隔符」、「自定义」、「输出分隔符」、「自定义输出」、「引号」,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「a,b,c」,得到「a ⏎ b ⏎ c」。In the Change List Item Separator: Paste or type into the input box, adjust "Input separator", "Custom", "Output separator", "Custom output", "Quotes"; the result appears below instantly — click "Copy result" to copy it. Example: "a,b,c" → "a ⏎ b ⏎ c".

和“列表格式转换”有什么区别?How is this different from List Converter?

“列表格式转换”专门做“每行一项 ↔ 逗号分隔”两种格式的互转;这个工具可以在换行、逗号、分号、Tab、空格、竖线和任意自定义分隔符之间任意转换,并能自动识别输入用的是哪种分隔符,适合处理从表格、日志或其他程序复制出来的各种列表。List Converter is specifically for switching between one-item-per-line and comma-separated lists. This tool converts between new lines, commas, semicolons, tabs, spaces, pipes and any custom separator in any direction, and detects which separator the input uses, so it suits lists copied from spreadsheets, logs or other programs.

引号选项有什么用?What are the quote options for?

单引号会把每一项写成 'a'(项目里的单引号会按 SQL 规则写成两个),适合 SQL 的 IN (...) 条件;双引号按 JSON 规则加引号并转义,配合逗号分隔符就是 JSON 数组的内容,在外面加上 [ ] 即可。Single quotes write each item as 'a' (a single quote inside is doubled, SQL-style), ready for an SQL IN (...) clause. Double quotes quote and escape items JSON-style; with a comma separator that's the inside of a JSON array, so just add [ ] around it.

分隔符是怎么自动识别的?How is the separator detected automatically?

“自动识别”按以下顺序判断:有换行就按行分隔,否则依次检查 Tab、分号、逗号(含中文逗号和顿号)、竖线,最后才是空格。用逗号、分号或 Tab 分隔时支持 CSV 式的双引号,例如 "北京, 中国" 会被当作一项。需要其他符号时选择“自定义”,可用 \n 和 \t 表示换行和 Tab。输出沿用原来的分隔符(包括自定义分隔符和中文逗号),含分隔符的项会重新加上双引号;空行默认忽略,不算作项目。Auto-detect works in this order: if there are line breaks, each line is an item; otherwise it checks for tabs, semicolons, commas (including the Chinese comma and enumeration comma), pipes and finally spaces. With comma, semicolon or tab separators, CSV-style double quotes are honoured, so "Paris, France" counts as one item. Choose Custom for anything else; \n and \t stand for a new line and a tab. The output keeps the original separator (including a custom one or the Chinese comma), items that contain the separator are quoted again, and blank lines are ignored by default.

处理大段文本会卡吗?Can it handle long text?

「列表分隔符转换(换行 / 逗号 / 分号 / Tab 任意互转)」在浏览器中直接处理,几 MB 以内的文本通常瞬间完成;文本不会离开你的设备。The Change List Item Separator runs in your browser; text up to a few MB is usually processed instantly and never leaves your device.

「列表分隔符转换(换行 / 逗号 / 分号 / Tab 任意互转)」免费吗?需要注册吗?Is the Change List Item Separator free? Do I need an account?

「列表分隔符转换(换行 / 逗号 / 分号 / Tab 任意互转)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Change List Item Separator 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

📋 列表格式转换List Converter (Lines ↔ Comma)🗂️ 列表分组(按数量分组、平均分组、按首字分组)Group List Items✂️ 列表截取(取第 N 到 M 项、前 N 项、Python 切片)Slice a List🔄 列表循环移动(旋转列表顺序)Rotate a List🔘 给列表加项目符号或编号(• - 1. a. i.)Add List Item Bullets🧽 去除列表项前缀(删除项目符号、编号或指定前缀)Remove a List Item Prefix🏛️ 列表转多列(把一列数据排成多列表格)Convert a List to Columns🦋 生成对称列表(镜像回文列表)Create a Symmetric List➕ 列表追加项目(在开头、末尾或指定位置插入)Append Items to a List⬅️ 列表左侧补齐(补零、补空格右对齐)Left-Pad a List🧹 删除连续重复项(合并相邻的重复项目)Delete Repeating List Items📊 列表统计(项数、重复项、长度、数值统计)Print List Statistics

← 全部工具All tools