Hex to Text Converter
Convert between text and hex with several separator styles
What is Hex to Text Converter?
This hex converter translates in both directions between text and hexadecimal byte strings, encoding multi-byte characters as UTF-8. Output can be space-separated, packed into one continuous run, or prefixed with 0x for pasting into code. The conversion runs locally in your browser.
How to use Hex to Text Converter
- 1Choose a direction: text to hex, or hex to text.
- 2When encoding, pick an output style so the result can be pasted directly into a byte array in your code.
- 3When decoding, spaces, 0x prefixes, and other noise are stripped automatically.
Frequently asked questions
Why does one CJK character take three bytes?+
Under UTF-8, ASCII characters take one byte while common CJK characters such as 你 fall in the three-byte range, and many emoji take four. That is why a hex string is often far longer than the character count suggests. If the other system uses a legacy encoding such as GBK, where the same character is two bytes, your hex output will not match theirs — agree on UTF-8 first.
Decoding fails with "length must be even" — what now?+
Each byte is two hex characters, so an odd length means the string was truncated or picked up a stray character. Check for a missing leading zero, for example 0f written as just f.
Related tools
All toolsBase64 Encoder & Decoder
Encode and decode Base64, with UTF-8 and URL-safe support
File to Base64
Convert files to Base64 and data URIs — nothing is uploaded
URL Encoder & Decoder
Percent-encode URLs, with separate modes for full URLs and parameter values
HTML Entity Encoder
Escape and unescape HTML entities
Unicode Escape Converter
Escape and unescape Unicode in three notations
Hash Generator
Compute SHA-1/256/384/512 and MD5 digests