UTF‑8 Converter
Text ↔ UTF‑8 Byte Sequences · Hex & Binary
utf8 = encode( text ) · text = decode( utf8 )
Encode text to UTF‑8 byte sequences or decode UTF‑8 bytes back to text. See the raw bytes behind every character.
Presets:
0 chars
0 chars
idle
UTF‑8 Encoding Steps
0 steps| # | Character | Code Point | UTF‑8 Hex | UTF‑8 Binary | Bytes |
|---|---|---|---|---|---|
| Enter text to see UTF‑8 encoding steps | |||||
UTF‑8 Byte Patterns Reference
How Unicode characters are encoded
| Unicode Range | Byte 1 | Byte 2 | Byte 3 | Byte 4 |
|---|
UTF‑8 encodes each character in 1–4 bytes · ASCII (0–127) = 1 byte · Supports all Unicode characters
Variables
| Symbol | Quantity | Unit |
|---|---|---|
| text | Text Input | characters |
| utf8_bytes | UTF-8 Bytes | hexadecimal |
What it means
UTF‑8 is the most common Unicode encoding, using 1‑4 bytes per character. This converter shows the exact byte sequence that represents your text, revealing the underlying storage format used in most modern systems.
Worked example
Example 1 – Encode ASCII Text
Basic ExampleScenario: A student wants to see how the word "Hello" is represented in UTF-8.
| Parameter | Value |
|---|---|
| Input Text | Hello |
| Encoding | UTF-8 |
| Bytes Used | 5 |
1H = 48
2e = 65, l = 6C, l = 6C
3o = 6F
Result48 65 6C 6C 6F✓ UTF-8 bytes generated successfully.
Example 2 – Encode Multilingual Text
Unicode ExampleScenario: A developer wants to understand how a Unicode character is stored in UTF-8.
| Parameter | Value |
|---|---|
| Input Text | € |
| Unicode Code Point | U+20AC |
| Bytes Used | 3 |
1Unicode value = U+20AC.
2UTF-8 uses three bytes for this character.
3UTF-8 representation = E2 82 AC.
ResultE2 82 AC✓ Unicode character encoded successfully.
Example 3 – Encode an Emoji
Real-WorldScenario: A web developer is debugging UTF-8 encoded emoji data received from an API.
| Parameter | Value |
|---|---|
| Input Text | 😊 |
| Unicode Code Point | U+1F60A |
| Bytes Used | 4 |
1UTF-8 supports all Unicode emojis.
2The emoji requires four bytes in UTF-8.
3UTF-8 representation = F0 9F 98 8A.
ResultF0 9F 98 8A✓ Emoji encoded successfully.
Common mistakes
- Misunderstanding variable‑length encoding (1‑4 bytes per character).
- Assuming invalid byte sequences are valid UTF‑8.
- Not handling BOM (Byte Order Mark) correctly.
- Confusing UTF‑8 with other encodings like Latin‑1.
Applications
- Ensure web content displays correctly.
- Debug encoding mismatches in APIs.
- Understand the internal representation of text in memory.
- Prepare data for low‑level network protocols.
Related calculators · Data Encoding & Conversion
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.