Web Analytics

 Text Encoding Byte Counter

Count the encoded byte size of text in UTF-8, UTF-16, or UTF-32. Choose little- or big-endian byte order, optionally include a byte order mark (BOM), and compare results instantly in your browser.

Text encoding byte counter

Choose an encoding to calculate its byte size. Your text stays in this browser.

๐Ÿ“Š UTF-8 text size

UTF-8 bytes
0
Characters (Unicode code points)
0
Bytes per character
0
UTF-8 bytes without whitespace
0
ASCII characters
0
Non-ASCII characters
0

KB uses 1,000 bytes; KiB uses 1,024 bytes. Counts use the text as entered, with line breaks normalized by the browser. UTF-16 and UTF-32 byte order can be selected above.

0 KB ยท 0 KiB

Text encoding byte counter

This free text encoding byte counter measures how much space text uses in UTF-8, UTF-16, or UTF-32. Choose little-endian or big-endian byte order for UTF-16 and UTF-32, and optionally include a byte order mark (BOM). Compare the encoded byte size of whitespace, accented letters, non-Latin scripts, and emoji instantly in your browser.


โญ Bytes vs. characters

A character is not always one byte. In UTF-8, characters use between one and four bytes. UTF-16 uses two bytes for most characters and four for characters outside the Basic Multilingual Plane. UTF-32 uses four bytes per Unicode code point. The same text can therefore have a different byte size in each encoding.


๐Ÿ”Ž What this byte counter measures

  • UTF-8 โ€” variable-width encoding that uses one to four bytes per Unicode code point.
  • UTF-16 little-endian and big-endian โ€” two-byte code units, with supplementary characters represented by a four-byte surrogate pair.
  • UTF-32 little-endian and big-endian โ€” four bytes per Unicode code point.
  • Optional BOM โ€” include the encoding's byte order mark in the reported size.
  • Characters โ€” Unicode code points, which may differ from the number of visual symbols.
  • Bytes per character โ€” the average encoded byte size for the text.
  • Bytes without whitespace โ€” the selected encoding's byte length after whitespace characters are removed.
  • ASCII and non-ASCII characters โ€” a quick view of how many code points are in each group.

โš™๏ธ When should I count encoded text bytes?

Use a byte counter when a system limits data by bytes rather than characters. This can help check API request sizes, database fields, message payloads, file contents, and form submissions. Select the same encoding, byte order, and BOM behavior as the target system, and verify whether additional formatting or protocol data is included.


๐Ÿ’ก Example: ASCII and emoji

The text Hello has 5 characters and 5 bytes in UTF-8, 10 bytes in UTF-16, and 20 bytes in UTF-32. The text Hi ๐Ÿ˜Š has 4 Unicode code points: it takes 7 bytes in UTF-8, 10 in UTF-16, or 16 in UTF-32. The counter lets you compare these sizes.


๐Ÿ“ KB and KiB

The tool displays decimal kilobytes (KB), where 1 KB is 1,000 bytes, and kibibytes (KiB), where 1 KiB is 1,024 bytes. Check which unit a service uses before comparing its size limit.


โš ๏ธ Byte count and line endings

Browsers normally normalize line breaks in a text area. This tool counts the text value as the browser provides it, so the reported size may differ from a file that preserves Windows CRLF or another line-ending format. The BOM option adds the selected encoding's BOM to the reported totals.


๐Ÿ” Private, in-browser counting

Your text is counted locally in your browser and is not uploaded or stored by this tool. Use Clear to remove the text from the input when you are done.


This tool is also known as

  • UTF-8 UTF-16 UTF-32 byte counter
  • count text bytes in different encodings
  • UTF-16 byte counter online
  • UTF-32 byte counter online
  • compare UTF encoding sizes

Frequently Asked Questions

Paste or type your text, then choose UTF-8, UTF-16, or UTF-32. Select the byte order for UTF-16 or UTF-32 and optionally include a BOM. Results update instantly.

Characters are text units, while bytes measure encoded data size. In UTF-8, some characters use more than one byte, so byte count can be higher than character count.

UTF-8 uses one to four bytes per Unicode code point. UTF-16 uses two bytes for most code points and four bytes for supplementary ones. UTF-32 uses four bytes per code point.

Yes. The total includes spaces, tabs, and line breaks present in the text area. A separate result shows the selected encoding byte count after whitespace is removed.

The byte count depends on the selected encoding: emoji typically use multiple bytes in UTF-8, a surrogate pair in UTF-16, and four bytes per code point in UTF-32. Character count is shown separately as Unicode code points, so a combined visual emoji may count as multiple code points.

It is the average number of bytes in the selected encoding per Unicode code point in your text. The value is zero for empty input.

KB is decimal and equals 1,000 bytes. KiB is binary and equals 1,024 bytes. The tool displays both values for easy comparison.

Yes, it can help estimate the encoded byte size of text for byte-based API, database, or message limits. Select the same encoding and BOM behavior as the target service, and check whether it counts additional formatting or metadata.

Text areas generally normalize line endings. A file that stores Windows CRLF line endings may therefore have a different byte size than the same text measured in the browser.

No. The calculation runs in your browser, and your text is not uploaded to a server by this tool.

Yes. It is free to use in your browser and does not require an account.

Our text tools

  • Byte Counter
    Count text bytes in UTF-8, UTF-16, or UTF-32, with byte-order and BOM options.
  • Count characters
    Count characters, letters, numbers, spaces and lines instantly.
  • Count lines
    Count total, non-empty, and empty lines in text.
  • Count paragraphs
    Count paragraphs separated by blank lines.
  • Count sentences
    Count the number of sentences in text instantly.
  • Count spaces
    Count every standard space in text, including consecutive and leading spaces.
  • Count specific characters
    Count how many times a character, word, or string appears in text.
  • Count words
    Count the words in text or code.
  • Text counter & analyzer
    Count characters, words, sentences, paragraphs, lines, spaces, unique words and more in one powerful text analyzer.