Text to hex converter
Type text to get its bytes in hexadecimal, the usual form in developer tools and data dumps.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter text and style.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
The text is encoded to UTF-8 bytes, then each byte is written as two hex digits: 72 = 4 × 16 + 8 = 48.
Example
Inputs: Style = Spaced (48 65). Result: Hex: 48 69; Bytes: 2; Characters: 2.
Hi
48 69
Limits and caveats
- Values are UTF-8 bytes, not Unicode code points. For code points use the text to Unicode tool.
Questions about this tool
How is text hex different from a Unicode code point?
The letter س has code point U+0633, but its UTF-8 bytes are D8 B3. This tool shows the bytes.
Are the letters upper or lower case?
A to F are written in upper case. The value is the same in lower case.
When would I use the \x style?
In Python, C and JavaScript strings, to write specific bytes inside a literal.
