❝ CSV 加引号(按需或强制)Add CSV Quotes
给 CSV/TSV 每个字段都加上双引号:可选只给含分隔符/引号/换行的字段加引号(标准写法),或强制给所有字段加引号(方便导入挑剔的程序)。自动识别分隔符,正确处理已有引号。Add double quotes around every CSV/TSV field. Quote only fields that need it (the standard style), or force-quote every field for picky importers. The delimiter is detected and existing quotes are handled correctly.
使用说明与常见问题How-to & FAQ
「CSV 加引号(按需或强制)」是什么?What is the Add CSV Quotes tool?
给 CSV/TSV 每个字段都加上双引号:可选只给含分隔符/引号/换行的字段加引号(标准写法),或强制给所有字段加引号(方便导入挑剔的程序)。自动识别分隔符,正确处理已有引号。Add double quotes around every CSV/TSV field. Quote only fields that need it (the standard style), or force-quote every field for picky importers. The delimiter is detected and existing quotes are handled correctly.
如何使用「CSV 加引号(按需或强制)」?How do I use the Add CSV Quotes tool?
在「CSV 加引号(按需或强制)」中,把内容粘贴或输入到上方输入框,按需设置「方式」,结果会实时显示在下方,点击「复制结果」即可复制。Paste a CSV or TSV into the box and pick a Mode: "Quote only when needed" or "Quote every field". The result updates as you type; click "Copy result" to copy it.
两种方式有什么区别?How do the two modes differ?
“仅必要时”只给含分隔符、引号或换行的字段加引号,这是 RFC 4180 的标准写法,文件更短。“全部字段”让每一格都带引号,有些老旧导入工具或严格校验器更喜欢这种。'Quote only when needed' wraps fields that contain the delimiter, a quote or a line break — the RFC 4180 style, and shorter. 'Quote every field' wraps every cell, which some older importers and strict validators prefer.
已经有引号的字段会怎样?What about fields that are already quoted?
先按 CSV 规则解析再重新输出,所以原来的引号会被规范化:内部引号写成两个双引号,不会叠出错误的引号层。The input is parsed by CSV rules and written again, so existing quotes are normalised: inner quotes become doubled double-quotes, with no broken quote nesting.
行长度不一致(有的行字段多、有的行字段少)时会怎样?What happens when rows have different numbers of fields?
不会凭空补字段,也不会删掉字段:操作只作用于每行实际存在的字段,每行保持自己原来的长度。比如某行没有要处理的那一列,这一行就原样保留。检测到这种行时,结果下方会有一行提示说明有几行。需要统一列数时,请用“CSV 补齐不完整行”。No fields are invented or dropped: the operation only touches the fields each row actually has, and every row keeps its own length. If a row does not have the column being changed, that row is left as it is. When such rows are found, a one-line note below the result says how many. To give every row the same number of fields, use Fill Incomplete CSV Records.
代码或数据会被上传吗?Is my code or data uploaded?
不会。「CSV 加引号(按需或强制)」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The Add CSV Quotes tool runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.
「CSV 加引号(按需或强制)」免费吗?需要注册吗?Is the Add CSV Quotes tool free? Do I need an account?
「CSV 加引号(按需或强制)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Add CSV Quotes tool is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.