Character & word counter
Count characters, words, lines, CJK ideographs and UTF-8 bytes
Type or paste text for live totals. Before checking a limit, confirm whether the target counts characters, bytes or uses its own weighting rules.
| Characters (with whitespace) | 0 |
|---|---|
| Characters (no whitespace) | 0 |
| Words | 0 |
| Lines | 0 |
| CJK unified ideographs | 0 |
| Bytes (UTF-8) | 0 |
Example
Input
A中 B
Example result
Code points: 4 · Non-whitespace: 3 · Lines: 2 · UTF-8 bytes: 6
The newline is one code point and one UTF-8 byte; 中 occupies three bytes.
Technical details & limits
Characters are counted by code point and bytes by UTF-8 TextEncoder, so the totals can differ. Combining marks and joined sequences may contain multiple code points. Word groups use runs of letters and numbers with connectors, not Chinese lexical segmentation. Han counting covers the ranges implemented here, not every Unicode extension.
About this tool
Count Unicode code points, non-whitespace characters, word groups, lines, Han characters and UTF-8 bytes in real time. Compare field-length and byte limits with clearly stated counting rules.
Use cases
- Check character totals before publishing or submitting text. A target platform may count differently; verify its own rules.
- Estimate how many UTF-8 bytes a mixed CJK/Latin block will consume in a column.
- Quickly see how many lines a CSV has, and whether it has blank rows.
Notes
Word groups use consecutive Unicode letters, numbers, underscores and supported connectors, not natural-language segmentation. Continuous Chinese may count as one group; use the Han column for character totals. Bytes use UTF-8.
FAQ
- Why can a Chinese sentence count as one word group?
- Words are runs of letters and numbers, not natural-language segmentation. Consecutive Han characters may form one group; use the Han or code-point total for character counts.
- Is `\n` counted as one character?
- Yes (as whitespace). Line count splits on `\n` / `\r\n`.
- Why does my editor show another character count?
- Editors may count UTF-16 units, visible graphemes or different newline sequences. First identify whether the target limit measures bytes, code points or graphemes.
- Why can one visible character count as several?
- This counts Unicode code points. Combining marks and some joined sequences contain multiple code points, so the total can differ from the number of perceived glyphs.
Related tools