How to use the text byte size calculator
- Type or paste your text into the first box.
- Read the UTF-8 size in bytes and the character counts in the summary.
- Optionally enter a byte limit, such as the size of a database field, to see how much room is left or how far over you are.
- Use Copy summary or Download file to keep the numbers.
Characters are not bytes
A computer stores text as bytes, and how many bytes a character takes depends on the encoding. In UTF-8, the usual encoding of web pages and files, plain English letters, digits and punctuation take 1 byte, many accented letters take 2, most other scripts and symbols take 3, and emoji take 4. The sample line Hello, world! Café 日本語 😀 has 24 characters but 34 bytes.
That is why a limit in bytes can be reached before a limit in characters, and why a text in English fits into more characters than the same text in another script.
The numbers on the page
Characters here are Unicode code points. Visible characters group an accent with its letter and join the parts of an emoji, such as a family or a person with a skin tone, so they match what you see. UTF-16, used inside browsers and some systems, takes 2 bytes for most characters and 4 for emoji, and UTF-32 takes 4 bytes for every character. Words are runs of non-space characters, and lines are counted by line breaks.
A line break counts as one character whether it came from Windows, Mac or Linux. Real files can add a byte-order mark or use different line endings, which this page does not model.
Where to use it
It helps when you fill a database column, an SMS or API field, a metadata box or a header with a byte limit. For character limits on social posts, see the social character counter, and for words and reading time the word counter. The Unicode code point converter shows the code behind each character, and the Base64 encoder turns bytes into text.
Everything runs in your browser and nothing is uploaded. The limit is 500,000 characters.
Assumptions and limits
- Sizes are for the text only, with no byte-order mark and no file or network overhead.
- A lone surrogate counts as the 3 byte replacement character, as browsers encode it.
- Visible characters use the browser's text segmentation when available, and fall back to code points otherwise.
- Nothing is uploaded or stored, and the input is limited to 500,000 characters.
Frequently asked questions
How many bytes is my text?
Paste it above. The UTF-8 size is the number most systems care about. Plain English text is about one byte per character, and other scripts and emoji take more.
Why is the byte count higher than the character count?
Some characters need more than one byte in UTF-8: accented letters take two, many other scripts three and emoji four. The page also lists characters above plain ASCII.
What is the difference between characters and visible characters?
A visible character is what you see as one symbol. An accented letter or an emoji with a skin tone can be several code points, but it displays as one.
Can I check a database field limit?
Yes. Enter the limit in bytes and the page tells you how many bytes are left or how far over you are. Check whether your field counts bytes or characters.