🔍

首页Home › 文本工具Text Tools

✅ ASCII 校验(检查文本是否只含 ASCII 字符)Validate ASCII

检查一段文本是否只包含 ASCII 字符(0–127),并列出每个非 ASCII 字符的位置(第几行第几列)、字符本身和 Unicode 码点,例如弯引号、全角标点、不换行空格、零宽字符和 BOM。也可以同时检查控制字符,或者按字符汇总出现次数、把问题字符标记出来。适合排查配置文件、CSV、源代码、域名和接口参数里的“看不见的字符”,数据在本地处理。Check whether a text contains only ASCII characters (0–127) and list every non-ASCII character with its line and column, the character itself and its Unicode code point — curly quotes, full-width punctuation, non-breaking spaces, zero-width characters and BOMs included. Optionally flag control characters too, summarise by character, or mark the offending characters in the text. Handy for tracking down invisible characters in config files, CSV, source code, domain names and API parameters. Processed locally.

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

「ASCII 校验(检查文本是否只含 ASCII 字符)」是什么?What is the Validate ASCII tool?

检查一段文本是否只包含 ASCII 字符(0–127),并列出每个非 ASCII 字符的位置(第几行第几列)、字符本身和 Unicode 码点,例如弯引号、全角标点、不换行空格、零宽字符和 BOM。也可以同时检查控制字符,或者按字符汇总出现次数、把问题字符标记出来。适合排查配置文件、CSV、源代码、域名和接口参数里的“看不见的字符”,数据在本地处理。Check whether a text contains only ASCII characters (0–127) and list every non-ASCII character with its line and column, the character itself and its Unicode code point — curly quotes, full-width punctuation, non-breaking spaces, zero-width characters and BOMs included. Optionally flag control characters too, summarise by character, or mark the offending characters in the text. Handy for tracking down invisible characters in config files, CSV, source code, domain names and API parameters. Processed locally.

如何使用「ASCII 校验(检查文本是否只含 ASCII 字符)」?How do I use the Validate ASCII tool?

在「ASCII 校验(检查文本是否只含 ASCII 字符)」中,把内容粘贴或输入到上方输入框,按需设置「显示方式」,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「plain text ok」,得到「✓ 全部 13 个字符都是 ASCII」。In the Validate ASCII: Paste or type into the input box, adjust "Show"; the result appears below instantly — click "Copy result" to copy it. Example: "plain text ok" → "✓ 全部 13 个字符都是 ASCII".

什么是 ASCII 字符?What counts as an ASCII character?

ASCII 是码点 0–127 的 128 个字符:英文字母、数字、常用标点、空格以及 Tab、换行等控制字符。中文、带重音的字母(é)、弯引号(“ ”)、全角标点、表情、不换行空格(U+00A0)、零宽空格(U+200B)和 BOM(U+FEFF)都不是 ASCII。ASCII is the 128 characters with code points 0–127: English letters, digits, common punctuation, the space and control characters such as tab and line feed. Chinese, accented letters (é), curly quotes, full-width punctuation, emoji, the non-breaking space (U+00A0), the zero-width space (U+200B) and the BOM (U+FEFF) are not ASCII.

行和列是怎么数的?How are lines and columns counted?

行从 1 开始,Windows(CRLF)、Unix(LF)和旧 Mac(CR)换行都算一次换行;列按字符计数,一个汉字或一个表情算 1 列。看不见的字符(空白、零宽字符、BOM)只显示码点,避免误以为是空格。Lines start at 1, and Windows (CRLF), Unix (LF) and old Mac (CR) line breaks each count once. Columns count characters, so a Chinese character or an emoji is one column. Invisible characters (spaces, zero-width characters, the BOM) are shown only by code point so they are not mistaken for ordinary spaces.

“控制字符”指什么?What are control characters?

码点 0–31 和 127 的字符,例如响铃(U+0007)、退格、ESC(U+001B)和 DEL。它们属于 ASCII,但通常不该出现在文本里。勾选后会一起报告;Tab、换行(LF)和回车(CR)不算问题。Characters 0–31 and 127, such as bell (U+0007), backspace, ESC (U+001B) and DEL. They are ASCII but rarely belong in text. Tick the option to report them as well; tab, line feed (LF) and carriage return (CR) are never flagged.

怎么去掉这些字符?How do I get rid of these characters?

这个工具只检查不修改。要把弯引号、全角符号、重音字母等转换成 ASCII,可以用“Unicode 转 ASCII”工具;“在文本中标记”方式会把每个问题字符替换成 [U+XXXX],方便在编辑器里搜索定位。This tool only checks. To convert curly quotes, full-width symbols and accented letters into ASCII, use Convert Unicode to ASCII. The "Mark them in the text" view replaces every offending character with [U+XXXX] so you can search for them in your editor.

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

「ASCII 校验(检查文本是否只含 ASCII 字符)」的设置:「显示方式」可选 逐个列出位置、按字符汇总、在文本中标记(默认 逐个列出位置);可勾选:「同时检查控制字符(Tab、换行除外)」。改动任一选项后结果会按新设置重新生成。Settings in the Validate ASCII — "Show": List each position, Summary by character, Mark them in the text (default List each position); tick boxes: "Also flag control characters (except tab and line breaks)". Changing any option regenerates the result with the new setting.

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

「ASCII 校验(检查文本是否只含 ASCII 字符)」在浏览器中直接处理,几 MB 以内的文本通常瞬间完成;文本不会离开你的设备。The Validate ASCII runs in your browser; text up to a few MB is usually processed instantly and never leaves your device.

「ASCII 校验(检查文本是否只含 ASCII 字符)」免费吗?需要注册吗?Is the Validate ASCII free? Do I need an account?

「ASCII 校验(检查文本是否只含 ASCII 字符)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Validate ASCII 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

🔤 Unicode 转 ASCII(去掉重音、全角转半角、替换特殊符号)Convert Unicode to ASCII🔡 ASCII 码对照表ASCII Table打乱段落Shuffle Paragraphs🔀 打乱句子Shuffle Sentences🔀 打乱单词Shuffle Words🔣 添加组合附加符号Add Combining Characters↔️ 居中 Unicode 文本Center Unicode🕵️ 检查伪装 Unicode 文本Check Spoofed Unicode Text🧱 按字素分块 UnicodeChunkify Unicode🔤 码位转 Unicode 字符Convert Code Points to Unicode🔢 Unicode 转码位Convert Unicode to Code Points🔟 Unicode 转十进制码位Convert Unicode to Decimal

← 全部工具All tools