Character Counter and UTF-8 Byte Limit

About this tool

Paste text to count characters with and without whitespace, and see its UTF-8 byte length. Set a byte limit to get the beginning of the text that fits. All processing happens entirely in your browser (no data is sent).

Count text

Characters including spaces and line breaks —

Characters excluding spaces and line breaks —

UTF-8 byte count —

Fit text within a UTF-8 byte limit

How spaces and line breaks are counted

A 猫 has three characters with the space and two without it. In UTF-8, A and the space each use one byte, and 猫 uses three, for a total of five bytes.

The count excluding spaces and line breaks also skips full-width spaces and tabs. It counts only line breaks in the input. Wrapping to fit the screen leaves the count unchanged.

Pasted line breaks become LF in the text field, so each counts as one character and one byte. A file saved with Windows CRLF uses two bytes per line break.

Counting emoji and combining marks

Characters are counted as grapheme clusters. The emoji 👩‍💻 combines several code points and counts as one character. It uses 11 bytes in UTF-8.

The Japanese hiragana が can be written as the single code point が or as か followed by a combining voicing mark, が. Both count as one character. They use three and six UTF-8 bytes respectively. The byte count uses the text as entered.

Some forms and social networks count an emoji as several characters. Follow the counter on the service where you will submit the text.

Example of a 16-byte UTF-8 field

Suppose a CSV importer limits a heading to 16 bytes. 開発👩‍💻募集 uses 23 bytes, seven over the limit. The leading 開発 uses six bytes, and the next emoji needs 11. With a limit of 16, the copyable field contains 開発. The tool keeps emoji and combining sequences intact.

Use this when the importer expects UTF-8 and limits the field value itself. The count excludes CSV delimiters and any quotes added on export.

Check a UTF-8 byte limit with the character counter