Text to Hex
Convert UTF-8 text bytes into hexadecimal values.
Encode Unicode text as UTF-8 bytes, or decode and validate byte sequences as strict UTF-8 text.
Choose the byte format explicitly because hexadecimal, decimal, binary, and prefixed byte syntax follow different parsing rules.
Your input is processed in this browser and is not submitted to UnicodeNow.
Encode uses Unicode text → optional normalization → UTF-8 bytes → selected byte format. Decode uses selected byte representation → parsed bytes → strict UTF-8 validation → Unicode text. For U+ notation, use Unicode Code Points to Text.
Operation
Continuous hexadecimal forces no separator. \x output can use no separator safely.
Byte inspection shows parsed bytes without interpreting them as text.
Output represents UTF-8 bytes, not Unicode code-point notation.
Decoded output is plain text. It is not executable code and is not automatically safe for HTML, JavaScript, SQL, shell commands or other contexts.
Byte inspection shows parsed bytes without requiring UTF-8 validity.
| Character | Code point | UTF-8 bytes | Byte count |
|---|
This tool works in two directions. Encode mode turns Unicode text into UTF-8 bytes and formats those bytes as hexadecimal, decimal, binary, 0x-prefixed, or \x-prefixed values. Decode mode parses a selected byte representation, validates the bytes as strict UTF-8, and returns Unicode text. The page runs locally in your browser.
The byte layer is explicit. A JavaScript string is not a byte array, and a byte dump is not automatically text. This page keeps those steps separate so malformed byte syntax, malformed UTF-8, optional BOM handling, and Unicode normalization can be diagnosed without guessing.
Unicode defines abstract code points such as U+0041, U+00E9, and U+1F600. UTF-8 is one way to encode those code points as bytes. ASCII code points use one byte, many Latin, Greek, and Cyrillic characters use two, many CJK characters and symbols use three, and supplementary characters such as many emoji use four.
That means character counts and byte counts are different questions. é is one Unicode code point but two UTF-8 bytes. 😀 is one code point but four UTF-8 bytes. A grapheme cluster such as a family emoji or a combining sequence may contain several code points and therefore many bytes.
| Character range | Typical byte length |
|---|---|
| ASCII | 1 |
| Many Latin, Greek, Cyrillic | 2 |
| Many CJK characters and symbols | 3 |
| Supplementary characters and many emoji | 4 |
| Text | Code point | UTF-8 bytes |
|---|---|---|
A | U+0041 | 41 |
é | U+00E9 | C3 A9 |
€ | U+20AC | E2 82 AC |
Ж | U+0416 | D0 96 |
中 | U+4E2D | E4 B8 AD |
😀 | U+1F600 | F0 9F 98 80 |
UTF-8 uses leading bytes and continuation bytes. A continuation byte is in the range 80 through BF. Invalid data can contain a leading byte without enough continuations, a continuation byte where a leading byte is required, an overlong encoding, a surrogate-range encoding, or a four-byte sequence above U+10FFFF. Decode mode reports byte offsets using one-based positions.
Examples such as C3, C3 28, A0 A1, ED A0 80, and F4 90 80 80 are rejected in UTF-8 text mode. Byte inspection mode still shows the parsed bytes when byte syntax is valid but the bytes are not text.
48 65 6C
48656C
72 101 108
01001000 01100101
0x48 0x65
\x48\x65
Auto-detect accepts clear input and reports ambiguity when the same text could mean more than one byte format. Choose the format explicitly for copied byte dumps, especially when values contain only digits.
The UTF-8 BOM is the byte sequence EF BB BF. It is optional in UTF-8 and is not normally required. Encode mode can add it only when you select that option. Decode mode can report and preserve a leading U+FEFF, remove it, or reject it. The same bytes in the middle of input are treated as text data, not as a BOM.
Normalization is separate from UTF-8 validity. With normalization off, é encodes as C3 A9, while e plus U+0301 encodes as 65 CC 81. If you choose NFC before encoding, the decomposed sequence may become the precomposed character and produce different bytes.
Valid byte syntax may represent images, PDFs, ZIP data, protocol messages, or text in another encoding. That data can be useful but not valid UTF-8. Use byte inspection when you need to inspect bytes without interpreting them as Unicode text.
This tool runs in your browser. Your input is not submitted to UnicodeNow. The output is written as textarea text, and downloads use Blob URLs that are revoked after use.
Input text:
Hello, café 😀
UTF-8 hex:
48 65 6C 6C 6F 2C 20 63 61 66 C3 A9 20 F0 9F 98 80
UTF-8 bytes:
48 65 6C 6C 6F
Decoded text:
Hello
UTF-8 is a variable-length encoding for Unicode code points.
Unicode defines code points; UTF-8 encodes those code points as bytes.
UTF-8 uses one to four bytes per Unicode code point.
Because U+00E9 is encoded as C3 A9 in UTF-8.
Many emoji are supplementary Unicode code points, and supplementary code points use four UTF-8 bytes.
A continuation byte is a byte in the range 80 through BF that continues a multi-byte UTF-8 sequence.
It is a longer-than-necessary byte sequence for a code point, and it is invalid UTF-8.
The bytes may represent binary data, another encoding, or malformed UTF-8.
A UTF-8 BOM is the optional leading byte sequence EF BB BF.
It can, because normalization may change the Unicode sequence before encoding.
It can inspect bytes, but arbitrary binary data may not be valid UTF-8 text.
Encoding is rejected rather than silently replacing it.
No. Strict decoding reports malformed UTF-8 instead of silently inserting U+FFFD.
No. This tool runs in your browser and does not submit input to UnicodeNow.
Convert UTF-8 text bytes into hexadecimal values.
Decode hexadecimal byte values into UTF-8 text.
Convert UTF-8 text bytes into binary byte groups.
Decode binary byte groups into UTF-8 text.
Convert text to decimal byte values or Unicode code points.
Convert decimal bytes or Unicode code point values to text.
Encode and decode UTF-8 text as standard or URL-safe Base64.
Count UTF-8 bytes, code points, grapheme clusters and UTF-16 code units for text.
Compare likely text encodings from raw bytes or byte-like input.
Inspect each Unicode character, encoding, category, script and normalization form.
Analyze code points, grapheme clusters, bytes, scripts and directionality.
Unicode defines characters and code points. UTF-8 encodes those code points as bytes for files, databases, web pages, APIs and network messages.
Learn what Unicode code points are, how U+ notation works, and how code points differ from glyphs, bytes, code units and visible characters.
Learn NFC, NFD, NFKC and NFKD, canonical and compatibility equivalence, and safe normalization for comparison, search and identifiers.
A safe workflow for diagnosing broken UTF-8, validating bytes, reversing mojibake, handling double encoding and auditing repairs.
Learn how zero-width spaces, joiners, non-breaking spaces, bidi controls and other invisible Unicode characters affect text.
Learn how Unicode escape syntax works across JavaScript, JSON, Python, PHP, Java, HTML, CSS and URLs.
Choose the right Unicode length unit for UI limits, storage limits, APIs, JavaScript, Python and PHP.