About This Tool
Hex writes one byte as two characters. Choose a direction, paste a value, and text and hex convert into each other as you type. When writing hex you can pick the separator (none, space, comma, colon), a prefix (0x or backslash x) and the letter case. When reading hex back you can either let the tool strip separators automatically or run in strict mode, which accepts hex digits only.
Text is turned into bytes with UTF-8, so a Latin letter is one byte, a Hangul syllable is three and most emoji are four. The result shows the UTF-8 byte count next to the UTF-16 code unit count and the code point count. A JavaScript string length is the code unit count, which counts one emoji as two, and mixing the three up is how length limits get miscalculated. Based on the UTF-8 and UTF-16 specifications as of October 2026.
If the hex has an odd number of digits or contains a character that is not hex, the tool names the offending character instead of guessing. Byte sequences that are not valid UTF-8 are shown with the U+FFFD replacement character and a warning, so converting that text back to hex will not match the original bytes. This tool does not handle Base64, URL encoding or charset conversion such as Windows-1252.
Frequently Asked Questions
UTF-8 uses one to four bytes per character. Latin letters and digits take one byte, many accented and Asian characters take two or three, and most emoji take four. So the hex digit count is twice the byte count, not twice the character count.
One byte is written as exactly two hex digits. With an odd count the last byte is only half present, and no specification says whether to pad at the front or the back. The tool refuses rather than guessing.
It does not do Base64, URL encoding or charset conversion. It only converts between UTF-8 bytes and their hex notation.