中英混排字符计数器
把中英混排的文字贴进来,分别查看字符数、汉字数、拉丁字母、空白、按空白计算的词数,以及 UTF-8 字节和 UTF-16 单元。文字只在你的浏览器里计算。
这些数字分别是什么 / What each number is
「字符」是 Unicode 码位,一个汉字、一个英文字母、一个标点或一个空格通常各算 1。「不含空白」会去掉空格、制表符和换行。「汉字 / 假名 / 韩文」统计中日韩表意和假名、韩文音节(与 CountText 首页和其他指南用的同一范围)。「拉丁字母」是 A–Z 和常见带音标字母,不包括数字。「词数(非中日韩)」先去掉中日韩字符,再按空白分词,与首页的「词数(约)」同一方法——它不是中文分词。
UTF-8 字节数在短信以外的地方有时会成为真正的上限:例如 YouTube Data API 把视频简介写成 5,000 字节,而不是 5,000 个字符。一个汉字通常是 3 个字节,许多 emoji 是 4 个字节。UTF-16 单元则与部分 API(例如 TikTok 字幕的「UTF-16 runes」)更接近:普通汉字是 1 个单元,许多 emoji 是 2 个。若某个产品只说「字符」却不说明编码,请以产品自己的计数器为准,并把本页当作对照。
English: characters are Unicode code points. “Without whitespace” drops spaces, tabs and line breaks. CJK uses the same range as the rest of CountText. “Words (non-CJK)” is the homepage’s rough whitespace count after CJK characters are removed — not Chinese word segmentation. UTF-8 bytes and UTF-16 units are included because some platform caps are written in those units, not in characters. For why the choice of unit changes a limit, see 中文字数限制怎么算 and the English guide Counting CJK and mixed text.
Frequently asked questions
一个汉字算几个字符?
在「字符」里算 1 个 Unicode 码位。在 UTF-8 里通常是 3 个字节。在 UTF-16 里通常是 1 个单元。
词数为什么不是中文词数?
CountText 不对中国、日本、韩文做分词。「词数(非中日韩)」只统计去掉中日韩字符以后、按空白分开的片段。
Does this upload my text?
No. All counts run in your browser.