UTF-8 byte counter
Measure the real size of text in UTF-8 bytes, UTF-16 units, code points and graphemes.
Related tools
UTF-8 byte counter
Character count and byte size are not the same thing. In UTF-8, plain English letters take one byte each, but "é" takes two, most CJK characters take three and an emoji like 👋 takes four — so a 160-character message can easily be far more than 160 bytes. Paste any text and this counter reports its exact UTF-8 byte size, the UTF-16 code units JavaScript's .length would report, the number of Unicode code points, the grapheme count (user-perceived characters, so a 👨👩👧 family counts as one) and the number of lines, plus the stored size in B, KB or MB for both encodings.
That breakdown answers practical questions fast: will this string fit a VARCHAR(255) column measured in bytes, an SMS segment, a 64 KB payload limit, an HTTP header budget, a localStorage quota? Why does a database complain about a "160-character" string, and why does an emoji count as two characters in one system and one in another? The counter shows all the competing definitions of "length" side by side so you can see exactly which one your limit uses.
Line endings matter for byte size too: a file saved with Windows CRLF endings is one byte per line larger than the same file with Unix LF endings. The line endings option lets you measure the text as pasted, or as it would be once converted to LF or CRLF.
Everything is computed locally in your browser using the standard TextEncoder API — the text you paste is never uploaded, so config files, tokens and private messages are safe to measure.