What this tool does
Text → Hex Use TextEncoder to get the real UTF-8 bytes, and then pad each byte into two hexadecimal digits. Continuous, Spaced and 0x Prefix only change the display form and do not change the underlying bytes.
- Full support for multi-language Unicode and newlines.
- Can output continuous Hex, space separated Hex or byte-wise 0x prefix.
- All encoding is done within the current browser, no external conversion services are called.
How to use it
- Enter the text to be encoded.
- Choose Continuous, Spaced or 0x Prefix.
- Click "Convert to Hex".
- Copy the results in the desired format.
Common uses
- Prepare UTF-8 Hex for byte protocol or test data.
- Check the actual UTF-8 bytes occupied by the character.
- Lossless round-trip validation with Hex → Text.
Privacy and security
Inputs and results are processed only in your browser's memory. Nothing is uploaded, sent to an online API, or stored automatically.
Text → Hex Features
Encode Unicode text into UTF-8 bytes and output in three common hexadecimal formats. Useful for everyday development and debugging; results can be reviewed, copied, or downloaded immediately.
FAQ
Why doesn't a Chinese character only occupy one byte?
UTF-8 generally uses multiple bytes for non-ASCII characters, which is a normal encoding rule.
Is the content the same in all three formats?
Same. They only differ in the delimiter and 0x prefix.
Can emoji be converted correctly?
Can. TextEncoder will encode complete Unicode characters into corresponding UTF-8 bytes.
Will the text be sent to the server?
No, the conversion is performed entirely locally in the browser.