⚡ Multi-Format Output, BOM Toggle & Code Point Inspector

UTF-8 Encoder Online

Convert text and emojis into UTF-8 byte representations (Hex, Binary, Decimal, Percent-Encoded, C/JS/Rust escapes) with BOM prepend toggle, character code point matrix, and 100% browser privacy.

How to Use the UTF-8 Encoder

1

Enter Text / Emojis

Type or paste any text, international characters, or emojis into the input box.

2

Select Output Format

Choose Hexadecimal, Binary 8-Bit, Decimal, Percent-Encoded, or language escape codes.

3

Inspect Character Matrix

Explore the character matrix showing code points (U+XXXX), UTF-8 bytes, and surrogate pairs.

4

Copy Byte Streams

Copy generated byte streams or code snippets (C, JS, Python, Rust) with 1-click.

UTF-8 Variable-Length Encoding (RFC 3629), Code Points, & Byte Structure

UTF-8 (8-bit Unicode Transformation Format) is the dominant character encoding of the World Wide Web. Specified by RFC 3629, it encodes every valid Unicode scalar value into a sequence of 1 to 4 bytes while maintaining 100% backward compatibility with ASCII.

UTF-8 Bit Pattern Structure Table

Code Point RangeBytesByte 1Byte 2Byte 3Byte 4
U+0000 .. U+007F10xxxxxxx
U+0080 .. U+07FF2110xxxxx10xxxxxx
U+0800 .. U+FFFF31110xxxx10xxxxxx10xxxxxx
U+10000 .. U+10FFFF411110xxx10xxxxxx10xxxxxx10xxxxxx

UTF-8 Byte Order Mark (BOM: 0xEF 0xBB 0xBF)

The UTF-8 Byte Order Mark consists of the 3-byte sequence 0xEF, 0xBB, 0xBF. While not required by Unicode for UTF-8 (since UTF-8 has a fixed byte orientation), some Windows text editors insert it to identify file encodings.

100% Local Browser Privacy & Security

Our UTF-8 Encoder operates 100% locally in your web browser using native Web API TextEncoder and JavaScript Web Workers. Zero text data leaves your device.

Frequently Asked Questions

How does UTF-8 variable-length character encoding work?

UTF-8 encodes Unicode code points into sequences of 1 to 4 bytes. ASCII characters (U+0000 to U+007F) use 1 byte (0xxxxxxx). Greek, Cyrillic, and Arabic use 2 bytes (110xxxxx 10xxxxxx). CJK characters use 3 bytes (1110xxxx 10xxxxxx 10xxxxxx). Emojis and rare symbols use 4 bytes (11110xxx 10xxxxxx 10xxxxxx 10xxxxxx).

What is the UTF-8 Byte Order Mark (BOM)?

The UTF-8 BOM is a 3-byte sequence (0xEF, 0xBB, 0xBF) prepended to text files. While optional in UTF-8 (since byte order is fixed), some legacy Windows tools use it to identify UTF-8 file encoding.

How do UTF-16 surrogate pairs relate to UTF-8?

Surrogate pairs (e.g. U+D83D U+DE80 for 🚀) are used in UTF-16 to represent characters above U+FFFF. UTF-8 does not use surrogate pairs—it encodes the scalar code point (U+1F680) directly into 4 UTF-8 bytes (F0 9F 9A 80).

What output formats are available in this tool?

Hexadecimal (48 65), Binary 8-Bit (01001000), Decimal (72 101), Percent-Encoded (%F0%9F), C/C++ Escapes (\x48\x65), JS/JSON Escapes (\u0048�), and Rust Byte Arrays (&[0x48, 0x65]).

What options exist for byte separators?

You can format byte streams using space (" "), comma (", "), 0x prefix (0x48, 0x65), or continuous un-spaced output.

How does the Character & Surrogate Matrix work?

The character matrix breaks down your input text line-by-line, showing the visual character, Unicode code point (U+XXXX), UTF-8 hex bytes, 8-bit binary stream, byte count, Unicode block, and UTF-16 surrogate pair.

What code snippets are generated?

The tool automatically generates copyable code snippets for C/C++ byte arrays, JavaScript Uint8Array buffers, Python 3 bytes objects, and Rust u8 slices.

Why do emojis consume 4 bytes in UTF-8?

Emojis have Unicode code points above U+10000. Under RFC 3629, code points in this range require 21 payload bits, which are split across 4 UTF-8 bytes.

Is my input text sent to any server?

No. 100% of encoding, code point analysis, BOM prepending, and snippet generation runs locally in your browser via the native Web API TextEncoder. Zero data leaves your machine.

How do I decode UTF-8 byte streams back into text?

Click the "Switch to Decode" button or navigate to /encode-decode/utf8-decode to convert hex, decimal, binary, or escaped byte sequences back into UTF-8 text.

Related Encoding & Decoding Tools