iToolsPro

字符串合并

将多行字符串拼接为一个完整字符串,支持自定义分隔符、前后缀与去空行去空白

合并设置
提示:处理在本地完成,数据不会上传。自定义分隔符优先于下拉选择。
输入(每行一个) / 结果
Join · Separator · Prefix

多行变一行,拼接随心配

把每行一个的字符串按分隔符拼接成一个完整字符串,可加前后缀、去空行去空白,本地处理零上传。

100% 本地处理 · 数据不上传

核心特性

自定义分隔符
无、逗号、空格、换行或任意自定义分隔符,合并成需要的形式。
去空行去空白
跳过空行、去除每行首尾空白,合并结果干净无杂质。
前后缀包裹
加前缀与后缀,轻松拼出 [a, b, c] 或 (a)(b)(c) 等格式。

适用场景

🗄 数据拼接 📋 列表转行 🔍 SQL / 数组 ✉️ 批量收件人

字符串合并工具指南String Join Guide

了解分隔符、前后缀与常见问题。Separators, prefix/suffix, and answers to common questions.

功能说明What It Does

字符串合并工具把输入中每行一个的字符串按指定分隔符拼接成一个完整字符串。支持无分隔符、逗号、空格、换行与任意自定义分隔符,可加前后缀,并可跳过空行、去除每行首尾空白。

This tool joins one-per-line strings into a single string using a chosen separator: none, comma, space, newline or any custom separator. Prefix/suffix wrapping, skip-empty and trim options are supported.

全部在浏览器本地完成,数据不会上传。

Everything runs locally in your browser - nothing is uploaded.

使用示例Examples

输入 apple、banana、cherry 三行:分隔符「, 」得 apple, banana, cherry;前缀「[」后缀「]」得 [apple, banana, cherry];换行分隔可把多行转多段拼接。

With apple, banana and cherry as input: separator ", " gives apple, banana, cherry; prefix "[" and suffix "]" give [apple, banana, cherry]; a newline separator joins lines into one block.

使用步骤How to Use

  1. 每行输入一个字符串。Enter one string per line.
  2. 选择分隔符,按需填前缀、后缀与选项。Pick a separator, and set prefix, suffix and options as needed.
  3. 点击「合并」并复制结果。Click "Join" and copy the result.

常见问题FAQ

Q1. 如何拼出 SQL 的 IN 列表?Q1. How to build an SQL IN list?

用「逗号」分隔,前缀填 '( 后缀填 )' 或手动加引号,即可得到 ('a','b','c') 形式。Use the comma separator with a custom prefix/suffix (or add quotes manually) to get ('a','b','c').

Q2. 空行会影响结果吗?Q2. Do empty lines affect the result?

勾选「跳过空行」后空行会被忽略;不勾选时空行作为空字符串参与拼接。With "skip empty lines" checked, blank lines are ignored; otherwise they join as empty strings.

Q3. 自定义分隔符怎么写?Q3. How do I write a custom separator?

直接输入任意字符即可,如 " - " 或 "|";自定义分隔符会覆盖下拉选择。Type any characters, e.g. " - " or "|"; the custom separator overrides the dropdown.