Add Prefix/Suffix|批量加前后缀

Add Prefix/Suffix|批量加前后缀

Add Prefix/Suffix 批量加前后缀

为每一行文本添加“前缀 / 后缀”,一键批量生成:列表项、URL、标签、标记符、引用符等。
Add a prefix and/or suffix to each line to quickly build lists, URLs, tags, markers, quotes, and more.

1. 输入参数 · Input
规则很简单:工具会把输入按换行拆分成多行,然后对每一行进行“加前缀 + 原文 + 加后缀”。
The tool splits your text by line breaks, then outputs: prefix + original line + suffix, for each line.
前缀会放在每一行的最前面。常见用法:给关键词加 URL 前缀、加项目符号、加注释符号(#、//)、加 Markdown 列表符号(- )。
Prefix is placed before each line. Typical uses: URL base, bullets, comment markers (#, //), Markdown list “- “.
后缀会放在每一行的末尾。常见用法:追加查询参数、追加标记符、追加结尾分隔符(如逗号、分号)、追加文件后缀名(.txt、.md)。
Suffix is appended to the end of each line. Use it for query params, tags, trailing separators (, ;), or file extensions (.txt, .md).
小建议:如果你要生成 URL 列表,通常勾选「Trim」+「Skip empty lines」最省心。
Tip: for URL lists, enabling “Trim” + “Skip empty lines” is usually the safest choice.
✅ 已复制到剪贴板 · Copied
3. 使用说明 · Notes
  • 最常见用法:批量生成 URL · Most common: build URLs
    中文:把关键词(每行一个)粘贴到“原始文本”,在“前缀”里填网站域名或路径,在“后缀”里填参数或标记。点击“生成输出”,即可得到每行一个完整 URL。
    English: Paste keywords (one per line). Put your base URL/path in “Prefix”, and parameters/tags in “Suffix”. Click “Generate” to get one full URL per line.
  • 批量生成列表/清单 · Build lists / checklists
    中文:前缀可以是 “- ”、“* ”、“1) ” 或 “✅ ”,后缀可留空;再勾选“自动编号”,就能快速做任务清单、目录、素材列表。
    English: Use prefix like “- “, “* “, “✅ ” and optionally enable “Auto numbering” to create tidy task lists and inventories.
  • 代码/配置常用:加引号、逗号、分号 · Coding/config: quotes, commas, semicolons
    中文:很多场景需要把每行变成 JSON/数组元素:例如前缀填 “"”,后缀填 “",”,就能把多行变成带逗号的字符串列表。
    English: For JSON/arrays, set prefix to a quote and suffix to quote+comma to convert lines into array items.
  • 关于空行:保留结构 vs. 严格列表 · Empty lines: keep structure vs strict list
    中文:如果你的文本里空行代表分组/段落,建议取消“跳过空行”,并保留“仅对非空内容加前后缀”,这样段落不乱、空行也不会被加奇怪的前后缀。
    English: If blank lines separate groups/paragraphs, disable “Skip empty lines” and keep “Apply only to non-empty content” for cleaner formatting.
  • 安全提示:这是纯前端处理 · Safety: all local
    中文:本工具在浏览器本地运行,不会把你的文本上传到服务器(适合处理临时口令、内部标记、私密列表等)。但如果你在公共电脑上使用,请记得关闭页面或清空输入。
    English: Everything runs locally in your browser; nothing is uploaded. On shared computers, close the page or clear inputs afterwards.

说明:本工具仅做字符串拼接与简单清理(Trim/空行处理/编号),不会自动编码 URL,也不会替你判断路径是否正确。若你要处理中文 URL, 建议另配一个 “URL Encode/Decode” 工具使用。
Note: This tool does plain string concatenation with basic cleanup (trim/empty-line handling/numbering). It does not URL-encode or validate paths. If you need encoding for non-ASCII characters, use a separate URL Encode/Decode tool.