Communication

UTF-8 Converter

Live

Encode Unicode text as UTF-8 hexadecimal bytes or validate and decode a hexadecimal byte sequence back into text.

About UTF-8 Converter

The UTF-8 Converter exposes the bytes behind Unicode text. Encode ordinary text, accented letters, non-Latin scripts, or emoji into space-separated two-digit hexadecimal bytes, with every byte shown in an indexed strip. Switch direction to validate and decode a sequence such as 63 61 66 C3 A9 back into text. The report distinguishes byte length from Unicode character count and rejects malformed hexadecimal tokens or invalid UTF-8 sequences instead of replacing errors silently.

Encode or decode UTF-8

Workspace

Source workbench

Edit the source fields below and inspect the rendered output alongside your work.

This workspace updates as you edit.

Encode Unicode text to bytes or decode validated hexadecimal bytes to text.

Unicode text, or hexadecimal byte tokens such as 63 61 66 C3 A9.

UTF-8 result

Enter Unicode text or space-separated hexadecimal bytes.

UTF-8 method

encode each Unicode scalar value according to the UTF-8 one-to-four-byte bit patterns; decode space- or comma-separated hexadecimal octets only after strict UTF-8 validation.

How it works

UTF-8 represents each Unicode scalar value with one to four bytes. ASCII-range characters use one matching byte, while many accented letters, scripts, symbols, and emoji need multiple bytes. Decoding must validate the complete sequence because an isolated continuation byte, overlong form, surrogate value, or out-of-range value is not valid UTF-8.

Examples

Encode café

Example input
{
    "mode": "text_to_bytes",
    "value": "café"
}
Expected result
{
    "result": "63 61 66 C3 A9",
    "format": "UTF-8 hexadecimal bytes",
    "byte_length": 5,
    "character_count": 4,
    "valid": true,
    "mode": "text_to_bytes"
}

Decode an emoji

Example input
{
    "mode": "bytes_to_text",
    "value": "F0 9F 98 80"
}
Expected result
{
    "result": "😀",
    "format": "Unicode text",
    "byte_length": 4,
    "character_count": 1,
    "valid": true,
    "mode": "bytes_to_text"
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Citations & sources

  1. RFC 3629 — UTF-8, a transformation format of ISO 10646
  2. The Unicode Standard

Frequently asked questions

Why can one character use several bytes?

UTF-8 is variable length. ASCII code points use one byte, while higher code points use two, three, or four bytes. The character é uses two bytes and 😀 uses four.

What hexadecimal byte formats are accepted?

Enter one- or two-digit hexadecimal octets separated by spaces or commas. An optional 0x prefix is accepted per token. A continuous unseparated hex string is intentionally not guessed.

What is the difference between characters and bytes?

Character count reports Unicode code points in the text. Byte length reports storage or transmission octets after UTF-8 encoding. User-perceived grapheme clusters can still contain multiple code points.

Does UTF-8 use a byte order mark?

UTF-8 does not need byte-order signaling. A leading EF BB BF sequence represents U+FEFF and may be used as a signature, but software should not require it for ordinary UTF-8 text.