🔍

首页Home › 开发工具Developer Tools

“ CSV 更换引号样式(双引号 / 单引号)Change CSV Quote Style

把 CSV 字段的引号在双引号和单引号之间转换:有些数据库导出用单引号,本工具可改成标准双引号 CSV,或反过来。内部引号会正确转义。Convert CSV field quotes between double and single quotes. Some database exports use single quotes; this tool turns them into standard double-quoted CSV, or the other way round. Inner quotes are escaped correctly.

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

「CSV 更换引号样式(双引号 / 单引号)」是什么?What is the Change CSV Quote Style tool?

把 CSV 字段的引号在双引号和单引号之间转换:有些数据库导出用单引号,本工具可改成标准双引号 CSV,或反过来。内部引号会正确转义。Convert CSV field quotes between double and single quotes. Some database exports use single quotes; this tool turns them into standard double-quoted CSV, or the other way round. Inner quotes are escaped correctly.

如何使用「CSV 更换引号样式(双引号 / 单引号)」?How do I use the Change CSV Quote Style tool?

在「CSV 更换引号样式(双引号 / 单引号)」中,把内容粘贴或输入到上方输入框,按需设置「输入引号」、「输出引号」、「方式」,结果会实时显示在下方,点击「复制结果」即可复制。Paste your CSV, set "Input quotes" to the quote character the file uses, then choose "Output quotes" and the Mode. The converted CSV appears below as you type; click "Copy result" to copy it.

什么时候需要换引号?When do I need to change quotes?

MySQL 等导出有时用单引号;Excel 和大多数程序要双引号。先选对“输入引号”,再选“输出引号”。MySQL and similar exports sometimes use single quotes; Excel and most programs expect double quotes. Set Input quotes to match the file, then choose Output quotes.

单引号 CSV 是标准吗?Is single-quoted CSV standard?

不是。RFC 4180 规定用双引号。本工具支持单引号只是为了兼容非标准导出。No. RFC 4180 specifies double quotes. Single quotes are supported here only for non-standard exports.

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

例如在「CSV 更换引号样式(双引号 / 单引号)」中输入 a,b ⏎ 1,2,「输出引号」设为 输出单引号 ',「方式」设为 全部字段加引号,输出为:'a','b' ⏎ '1','2'(⏎ 表示换行)。With "Output quotes" set to Output ' and "Mode" set to Quote every field, the input a,b ⏎ 1,2 becomes 'a','b' ⏎ '1','2' (⏎ marks a line break).

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

「CSV 更换引号样式(双引号 / 单引号)」的设置:「输入引号」可选 输入用双引号 "、输入用单引号 '(默认 输入用双引号 ");「输出引号」可选 输出双引号 "、输出单引号 '(默认 输出双引号 ");「方式」可选 仅必要时加引号、全部字段加引号(默认 仅必要时加引号)。改动任一选项后结果会按新设置重新生成。You can adjust "Input quotes" — Input uses " / Input uses ' (default: Input uses "); "Output quotes" — Output " / Output ' (default: Output "); and "Mode" — Quote only when needed / Quote every field (default: Quote only when needed). The result updates as soon as you change a setting.

行长度不一致(有的行字段多、有的行字段少)时会怎样?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 Change CSV Quote Style tool runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.

「CSV 更换引号样式(双引号 / 单引号)」免费吗?需要注册吗?Is the Change CSV Quote Style tool free? Do I need an account?

「CSV 更换引号样式(双引号 / 单引号)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Change CSV Quote Style 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.

相关工具Related tools

❝ CSV 加引号(按需或强制)Add CSV Quotes❞ CSV 去引号(去掉不必要的字段引号)Remove CSV Quotes📊 CSV 分析(行列统计 / 列类型预览)Analyze CSV📄 CSV 转文本(按分隔符拆成纯文本)Convert CSV to Text🗑️ CSV 删除列Delete CSV Columns🔢 CSV 删除单元格内的逗号(千分位等)Delete Commas Inside CSV Cells🧩 CSV 补齐不完整行(短行补空单元格)Fill Incomplete CSV Records🔍 CSV 查找不完整行(列数不足)Find Incomplete CSV Records🔃 CSV 列排序(按表头名或指定顺序重排)Sort CSV Columns🔀 CSV 交换两列Swap CSV Columns✂️ CSV 去除单元格首尾空格Trim CSV Columns📏 CSV 截断单元格(限制最大长度)Truncate CSV Columns

← 全部工具All tools