UTF-8 Encoder
Convert text to its UTF-8 bytes: hex, binary or decimal.
About the UTF-8 Encoder
What is a UTF-8 encoder?
UTF-8 is the encoding that runs the modern web — the agreed way to store every character, from a plain A to the euro sign to an emoji, as a sequence of bytes. A UTF-8 encoder shows you those bytes. Type some text and this tool reveals the exact byte sequence, in hexadecimal, binary or decimal, that a computer would save to disk or send over the network.
The clever part of UTF-8 is that it's variable width: ordinary English letters take a single byte, while accented characters, symbols and emoji use two, three or four. This encoder uses your browser's built-in TextEncoder, so the output is always accurate — and it never sends your text anywhere.
How to Use This Tool
- Enter your text. Type in the left box, paste, or open a
.txtfile. - Pick a format. Hexadecimal, binary or decimal for the byte values.
- Style the output. Choose the separator between bytes, add a prefix like
0xor%, and set uppercase or lowercase hex. - Copy or download. The bytes update live — copy them or save them as a file.
How UTF-8 sizes characters
| Character | Code point | Bytes | UTF-8 (hex) |
|---|---|---|---|
A | U+0041 | 1 | 41 |
é | U+00E9 | 2 | C3 A9 |
€ | U+20AC | 3 | E2 82 AC |
✨ | U+2728 | 3 | E2 9C A8 |
😀 | U+1F600 | 4 | F0 9F 98 80 |
Common Use Cases
- Debugging encoding bugs: See why a character shows up as mojibake by inspecting its real bytes.
- Networking & protocols: Prepare byte sequences for HTTP, sockets or binary formats.
- Escaping strings: Produce
\xor%-style byte escapes for code and URLs. - Learning Unicode: Watch how one to four bytes represent different characters.
Need to read bytes back into text? Use the UTF-8 Decoder. Want per-character codes instead of raw bytes? Try the Text to ASCII Converter.
Frequently Asked Questions
What is the difference between UTF-8 bytes and ASCII codes?
For plain English characters they're identical — one byte each, matching the ASCII value. The difference shows up with anything beyond basic ASCII: a character like € is a single Unicode character but three UTF-8 bytes. This tool shows those bytes; an ASCII converter shows one code per character.
Which output formats are available?
Hexadecimal, binary and decimal. You can choose the separator between bytes, add a prefix to each byte, and pick uppercase or lowercase for hex.
Does it handle emoji and non-English text?
Yes. UTF-8 covers the whole Unicode range, so emoji, accented letters and scripts like Arabic, Chinese or Cyrillic all encode correctly into their two-, three- or four-byte sequences.
Is this the same as URL encoding?
They're related but not identical. URL (percent) encoding is UTF-8 bytes written as %XX for unsafe characters. You can imitate it here by choosing hex output with a % prefix and no separator.
Is my text uploaded anywhere?
No. Encoding happens entirely in your browser using the native TextEncoder API, so your text never leaves your device.