首页Home › 编码与加密Encoding & Crypto
✅ 校验 UTF-8Validate UTF-8
校验 UTF-8:可检查文本、十六进制字节(如 C0 AF)或上传的文件,严格按 Unicode/WHATWG 规则找出过长编码、代理区、超出 U+10FFFF、截断和多余的后续字节,列出每个错误的字节位置和原因。本地处理。Validate UTF-8 in text, hex bytes (such as C0 AF) or an uploaded file, using the strict Unicode/WHATWG rules: overlong forms, surrogates, values above U+10FFFF, truncated sequences and stray continuation bytes are listed with their byte offset and reason. Processed locally.
使用说明与常见问题How-to & FAQ
「校验 UTF-8」是什么?What is the Validate UTF-8 tool?
校验 UTF-8:可检查文本、十六进制字节(如 C0 AF)或上传的文件,严格按 Unicode/WHATWG 规则找出过长编码、代理区、超出 U+10FFFF、截断和多余的后续字节,列出每个错误的字节位置和原因。本地处理。Validate UTF-8 in text, hex bytes (such as C0 AF) or an uploaded file, using the strict Unicode/WHATWG rules: overlong forms, surrogates, values above U+10FFFF, truncated sequences and stray continuation bytes are listed with their byte offset and reason. Processed locally.
如何使用「校验 UTF-8」?How do I use the Validate UTF-8 tool?
在「校验 UTF-8」中,把内容粘贴或输入到上方输入框,按需设置「检查内容」、「选择文件」,结果会实时显示在下方,点击「复制结果」即可复制。In the Validate UTF-8: Paste or type into the input box, adjust "Check", "Choose file"; the result appears below instantly — click "Copy result" to copy it.
可以检查哪些内容?What can I check?
三种:①「文本」检查输入框里的文字能否编码成 UTF-8(例如有没有单独的代理码元);②「十六进制字节」检查任意字节,如 C0 AF、E4B8AD、\xC0\xAF 或 %C0%AF;③「文件」直接检查上传文件的字节。注意:把 C0 AF 当文本输入只是普通字母,要选「十六进制字节」才会按字节检查。Three ways: (1) Text checks that the typed text can be encoded as UTF-8 (for example that it has no lone surrogates); (2) Hex bytes checks any bytes, written as C0 AF, E4B8AD, \xC0\xAF or %C0%AF; (3) File checks the bytes of an uploaded file. Note that C0 AF typed in Text mode is just letters; choose Hex bytes to check them as bytes.
按什么规则判断?Which rules are used?
按 Unicode / WHATWG 的严格规则:拒绝过长编码(C0、C1,E0 80–9F,F0 80–8F)、代理区(ED A0–BF)、超过 U+10FFFF(F4 90 及以上、F5–FF)、被截断的序列和多余的后续字节。每个错误都给出从 1 开始的字节位置和原因,最多列出 200 个。The strict Unicode / WHATWG rules: overlong forms (C0, C1, E0 80–9F, F0 80–8F), surrogates (ED A0–BF), values above U+10FFFF (F4 90 and up, F5–FF), truncated sequences and stray continuation bytes are rejected. Each error is listed with its byte position (counting from 1) and the reason, up to 200 errors.
开头的 BOM 算错误吗?Is a leading BOM an error?
不算。U+FEFF(字节 EF BB BF)是合法的 UTF-8,结果会注明它是 BOM。No. U+FEFF (bytes EF BB BF) is valid UTF-8; the result notes that it is a BOM.
有哪些选项可以调整?What options can I adjust?
「校验 UTF-8」的设置:「检查内容」可选 文本、十六进制字节、文件(默认 文本)。每次生成结果都按当前设置处理。Settings in the Validate UTF-8 — "Check": Text, Hex bytes, File (default Text). The result always uses the current settings.
编码和加密有什么区别?Is encoding the same as encryption?
编码(如 Base64、URL 编码)可直接还原,不提供保密性;加密需要密钥。「校验 UTF-8」的处理全部在本地完成。No. Encoding (Base64, URL…) is reversible by anyone; encryption needs a key. The Validate UTF-8 works fully offline in your browser.
「校验 UTF-8」免费吗?需要注册吗?Is the Validate UTF-8 free? Do I need an account?
「校验 UTF-8」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Validate UTF-8 is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.