InfyCalculator
💻

Character Counter

Count characters with and without spaces, UTF-8 byte length, words and lines — perfect for tweets, meta descriptions and SMS limits.

Your text
Loading calculator…

How it works

characters = number of UTF-16 code units (string length) · UTF-8 bytes = encoded byte length · a plain ASCII character = 1 byte, an accented letter = 2, most symbols/emoji = 3–4

Character count is the length of the string as the computer stores it — one unit per character for ordinary text. But "characters" and "bytes" diverge for anything beyond basic ASCII: UTF-8 encodes accented letters in 2 bytes, most symbols in 3, and emoji in 4, so a short caption can weigh far more than its visible length. This matters wherever a limit is measured in bytes (a database column, an SMS segment, an HTTP header) rather than in characters. The counter also reports words and lines, and separates spaces so you can see exactly what a "no-spaces" limit leaves you.

Worked example

"Café ☕" shows 6 characters — C, a, f, é, a space and the coffee cup — but 9 UTF-8 bytes: the four ASCII characters and the space are 1 byte each (5), "é" takes 2 bytes, and "☕" takes 3, for 5 + 2 + 3 = 9. A tweet counter would say 6; a byte-limited field would charge you 9.

Sources: TextEncoder — MDN

Frequently asked questions

Why are there more bytes than characters?

Because non-ASCII characters need more than one byte in UTF-8. Plain English letters are 1 byte each, but "é" is 2 bytes and an emoji is usually 4. So any text with accents or emoji reports more bytes than characters — the byte figure is what a byte-limited system actually measures.

Do spaces count as characters?

Yes. Spaces, tabs and line breaks are characters and are included in the main count. The "no spaces" figure strips all whitespace, which is the number some platforms use for their limits, so both are shown side by side.

Is this useful for Twitter/X or meta descriptions?

Yes — those limits are character-based (280 for a post, roughly 155–160 for a meta description), so the "characters" figure is what you want. If you are targeting SMS or a byte-limited database field instead, watch the UTF-8 byte count, since emoji can quietly blow past a byte cap.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.