Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1982
Encoding utility

UTF-8 inspector for byte encoding

Type or paste any string and see how UTF-8 encodes it: codepoints (U+xxxx), byte counts per character, BOM detection, per-character byte breakdown. Useful when an APDU or NDEF record is misrendering and you need to know if it’s a UTF-8, UTF-16, or BMPString issue.

Client-sidePer-char viewBOM aware

How to use this tool

What it does

Shows how UTF-8 encodes any string: codepoints, per-character byte counts, BOM detection and a byte-by-byte breakdown.

When to use it

Use it when an APDU, NDEF record or certificate field carries text and you need to see the exact bytes on the wire — especially with emoji, accents or a stray byte-order mark.

Worked example

Paste café and see the é expand to two bytes (C3 A9), so the four characters occupy five bytes.

Input

Result

Type something to convert.
All processing runs locally.

About UTF-8

UTF-8 encodes Unicode codepoints in 1–4 bytes. ASCII (U+0000–U+007F) is 1 byte; common Latin / Greek / Cyrillic accents are 2 bytes; CJK and most BMP scripts are 3 bytes; emoji and astral characters are 4 bytes.

Spec

RFC 3629 (UTF-8).

When you really wanted ASCII

Use the ASCII converter for plain ASCII inputs.

ASCII ↔ HEX →

Smart-card use

JavaCard UTF8String shows up in BER-TLV — see TLV parser.

TLV parser →

Frequently asked questions

How does UTF-8 encode a codepoint?

In one to four bytes. ASCII stays one byte; anything above U+007F uses a lead byte marking the length followed by continuation bytes of the form 10xxxxxx.

What is a BOM and should I keep one?

A byte-order mark, EF BB BF at the start of a file. UTF-8 has no byte order, so it carries no information and mainly breaks strict parsers — JSON in particular. Strip it.

Why does my string length differ between languages?

Because they count different things: bytes, UTF-16 code units, or codepoints. An emoji is commonly 4 bytes, 2 UTF-16 units and 1 codepoint, so all three answers differ.

What is a surrogate pair?

A UTF-16 mechanism for codepoints above U+FFFF. Encoded surrogates should never appear in UTF-8 bytes; if they do, the data went through a broken conversion.

Does anything I paste leave my browser?

Nothing. The tool is entirely client-side: the page ships a static script, does no network calls, and never transmits what you paste. You can confirm it by opening the network tab, or by loading the page and then going offline.