AnsRioSmart tools. Clear answers.
Home / Guides / Distinguish characters from UTF-8 bytes
Developer & data

Distinguish characters from UTF-8 bytes

Understand why counts, normalization, Base64 and hexadecimal representations can have different lengths for the same text.

Maintained by AnsRio · Updated 2026-10-17 · About 1 min read

A visible symbol, a Unicode code point and an encoded byte are different quantities. The distinction matters for length limits, exact text comparison and exchanging data between systems.

Choose the count you need

The word counter counts Unicode code points as characters and splits words on whitespace. A visible emoji may contain several code points. UTF-8 encodes those code points using variable numbers of bytes. An API byte limit therefore need not match a user-interface character limit.

Normalize deliberately

Visually similar strings may use a precomposed accented letter or a base letter followed by a combining mark. NFC and NFD handle canonical equivalence; compatibility forms NFKC and NFKD may fold additional distinctions. Keep originals when those distinctions matter to identifiers or typography.

Encoding is not protection

Hex and Base64 represent bytes as text; neither encrypts them. The UTF-8 decoders reject malformed sequences instead of silently inserting replacement characters. Converting a secret to another encoding does not make it safe to publish. Compare the byte count or text convention required by the destination system.

Worked example

Scroll the table horizontally on small screens to see every column.

Text represented as UTF-8 hexadecimal bytes
TextHex bytes
A41
éc3 a9
Hi48 69

Each hex pair represents a byte, not necessarily a complete visible character.

Sources and checks

Examples are illustrative and can be checked with the linked tools. Read each tool’s assumptions before applying its result. How we verify methods.

Browse all guides ↗
↗
Made for the question in front of you.

No sign-up. Tool inputs stay on your device.

How we work