What does a byte and bit counter do?
A byte and bit counter measures a text by its encoded size rather than by how many characters it appears to contain. It reports the UTF-8 byte count, the equivalent number of bits, the number of Unicode code points and the number of UTF-16 code units used by JavaScript and many editors.
The figures diverge because encodings are not one byte per character. A plain English letter takes one byte in UTF-8, most accented letters take two, many CJK characters take three and most emoji take four. A message that looks short can therefore be several times larger when stored or transmitted.
That difference matters wherever a limit is expressed in bytes: SMS segments, database columns, API payloads, file-size caps and form validation. Checking the real byte size before trimming is more reliable than guessing from the visible character count.
How to measure text in bytes and bits
- Paste or type the text into the box.
- Read the UTF-8 byte count and the equivalent number of bits.
- Compare the byte count with the code point count to see how much encoding overhead the text carries.
- Check the UTF-16 figure if you need the value JavaScript reports for string length.
- Use the size in KB or MB when comparing against a file or payload limit.
- Copy the summary if you need to record the measurement.
Byte and Bit Counter limits and rules
| Item | Limit |
|---|---|
| Encoding | UTF-8, the encoding used by most of the web |
| Counted | Bytes, bits, Unicode code points and UTF-16 code units |
| Size units | Bytes, kilobytes and megabytes, using 1,024 bytes per kilobyte |
| Text | Any Unicode text, including emoji and non-Latin scripts |
| Not covered | Legacy encodings such as UTF-16 files, Latin-1 or Shift-JIS |
| Note | A file may add a byte-order mark or line-ending bytes on disk |
When to use it
- Checking whether a message fits an SMS or API byte limit.
- Estimating the size of a string before storing it in a database column.
- Seeing how much an emoji or an accented letter adds to a payload.
- Comparing the byte cost of two phrasings of the same message.
- Explaining why a character count and a file size disagree.
Is it private?
Everything runs inside your browser. Your text and files are never uploaded, never stored and never seen by anyone else — including me. You can use the tool with the network tab open and watch no request leave the page. Closing the tab erases the input.
Frequently asked questions
UTF-8 uses one byte only for the basic ASCII range. Accented letters, CJK characters and emoji need two, three or four bytes each. The gap between the byte total and the code point total is the encoding overhead.
Most emoji take four bytes in UTF-8, and a sequence such as a family or a flag can take more because it is made of several code points. The counter reports the total for the whole text, so you can see the real cost rather than estimating it.
Both definitions are in use. This tool uses 1,024 bytes per kilobyte, which matches the way operating systems usually report file sizes. Storage vendors often use 1,000, which is why a drive's advertised capacity is smaller in the file manager.
A code point is a single Unicode character number. UTF-16 stores most characters in one 16-bit unit but uses two units for characters above the basic plane, including emoji. That is why JavaScript string length can be larger than the number of visible characters.
No. It measures the text exactly as entered. A file on disk may add a byte-order mark or use CRLF line endings, which add bytes that are not part of the visible content.
Related tools
Written and maintained by Md. Nur Hossain Repon.