Utilumo
LightDarkSystem
Explainer1 min readUpdated June 29, 2026

What is UTF-8?

Short answer

UTF-8 is a way to store text as bytes that can represent every character in Unicode, from plain English letters to accents and emoji. It is backward compatible with ASCII and is the dominant text encoding on the web.

Characters, code points, and bytes

Unicode assigns every character a number called a code point. UTF-8 is one way to turn those numbers into bytes for storage and transmission. It uses one to four bytes per character, spending more bytes only on rarer or more complex characters.

  • ASCII characters (A-Z, digits, punctuation) take a single byte
  • Accented Latin and many scripts take two bytes
  • Most other scripts take three bytes
  • Emoji and rare characters take four bytes
Bytes per character in UTF-8
ASCII A-Z1 byte
Accents2 bytes
Most scripts3 bytes
Emoji4 bytes
UTF-8 is variable length: common characters use fewer bytes, rarer ones use more.
ASCII is a subsetThe first 128 Unicode code points match ASCII exactly and encode as one byte in UTF-8, so any plain ASCII text is already valid UTF-8.

Why it matters

When the encoding is wrong, text turns into garbled symbols, sometimes called mojibake. Declaring UTF-8 everywhere keeps characters, including emoji and names with accents, correct from input to display. A character is not always one byte, which is why byte counts and character counts can differ.

Try it: Character CounterCount characters and UTF-8 bytes in text locally.Open tool

References

Questions

Is UTF-8 the same as Unicode?

Not quite. Unicode is the catalog that assigns each character a code point. UTF-8 is one encoding that turns those code points into bytes. UTF-16 is another encoding of the same Unicode.

Why do some characters count as more than one byte?

UTF-8 is variable length. ASCII characters use one byte, but accented letters, other scripts, and emoji use two to four, so byte count and character count are not always equal.

Does the character counter upload my text?

No. Counting happens locally in your browser and your text is never uploaded.

Keep reading