About This Tool
Character Counter shows Unicode code points, visible grapheme clusters, UTF-16 code units, and UTF-8 bytes separately, helping you check text length, emoji counts, and encoded size.
How to Use It
- Enter text, emoji, or characters with combining accents.
- Review code points, characters without whitespace, and UTF-8 bytes.
- Compare visible graphemes with UTF-16 code units. The tool tells you when grapheme segmentation is unavailable.
- Copy your original text or load the example to compare different representations.
Examples
- 😀: 1 Unicode code point, 2 UTF-16 code units, and 4 UTF-8 bytes.
- 👨👩👧👦: 7 Unicode code points, but 1 visible grapheme when grapheme segmentation is supported.
- An e followed by a combining accent and a precomposed é usually look alike, but use 2 and 1 code points, respectively.
Counting Rules
Characters are counted as Unicode code points. UTF-16 code units and UTF-8 bytes show text length in each encoding. Where supported, the grapheme count more closely matches the characters you see. Input is not Unicode-normalized, so different encodings of combining characters are preserved. Original line break characters count toward encoding totals; a trailing line break creates a final empty line. Each input accepts up to 2,000,000 UTF-16 code units.
Common Uses
- Check the UTF-8 size of text for APIs, files, or storage fields.
- Investigate length differences caused by emoji.
- Understand glyphs, code points, and encoding units.
Privacy
Your text, files, and previews are processed in your browser. Your input is never uploaded or automatically saved. Save anything you need to keep before leaving the page.
FAQ
How many characters is an emoji?
A simple emoji may be one code point, while families, flags, or skin-tone sequences may contain several. Grapheme count more closely reflects what a reader sees.
Why can UTF-16 length exceed the character count?
Code points outside the Basic Multilingual Plane use a UTF-16 surrogate pair, so one code point can take two code units.
Is UTF-8 Bytes the file size?
It is the number of bytes needed to encode the current text as UTF-8, excluding extra headers, a BOM, or filesystem metadata.
Are spaces counted?
The main character count includes whitespace. Characters without whitespace excludes spaces, tabs, line breaks, and other Unicode whitespace.
What if my browser cannot count visible graphemes?
Code point, UTF-16, and UTF-8 counts still work. The visible grapheme field explains that a reliable grapheme count is unavailable.