Hex ↔ Text
Convert UTF-8 text to a hex string, or parse a hex string back to text (separators :/.- ignored).
Hex conversion example
Each byte of the UTF-8 text is written as two hexadecimal digits, without separators:
Hi € → 486920e282ac
H= 72 =48,i= 105 =69, space = 32 =20€is three bytes in UTF-8:e2 82 ac
In the other direction, separators are removed before decoding, so all of these give Hi!:
486921
48 69 21
48:69:21
48-69-21
One byte holds a value from 0 to 255, which is 00 to ff. The first digit
counts sixteens and the second counts ones: ac is 10 × 16 + 12 = 172.
Reading a hex dump
- Odd number of digits. A byte needs two digits.
4869 2cannot be decoded; a leading zero is usually missing (02, not2). - The 0x prefix. Programming languages write
0x48. Remove the0xbefore decoding; it is notation, not data. - Hex is not always text. A SHA-256 hash, a MAC address and a packet capture are hex strings of binary data. Decoded as text they show replacement characters (�), which is the expected result.
- Byte order. Text bytes are in reading order. Numbers in a memory dump may be
little-endian: the 32-bit value 1 appears as
01 00 00 00. - Upper or lower case.
E2ande2are the same byte; the decoder accepts both.
Related tools
Monitor Hex ↔ Text automatically
Convert UTF-8 text to a hex string, or parse a hex string back to text (separators :/.- ignored). NetTests can run this check on a schedule, preserve historical results, compare changes over time, and alert you the moment something breaks.
Start monitoring free → See all monitoring productsFrequently Asked Questions
What is hexadecimal?
Hexadecimal (base-16) uses digits 0–9 and letters A–F to represent values 0–15 per digit. Each byte (8 bits) is represented by exactly two hex digits: 00–FF. Hex is commonly used for binary data, memory addresses, color codes (#FF5733), SHA hashes, and network packet dumps.
What does this tool encode exactly?
The text is first encoded as UTF-8 bytes, then each byte is written as two hex digits. A space (ASCII 32) becomes 20; the letter 'A' (ASCII 65) becomes 41. Multi-byte UTF-8 characters produce more than 2 hex digits — '€' (U+20AC) becomes e2 82 ac in UTF-8.
Why does decoding show replacement characters (�)?
The hex bytes, when interpreted as UTF-8, contained invalid sequences. This can happen with raw binary data (like an image or compiled code) that isn't valid text. The replacement character (U+FFFD) marks bytes that couldn't be decoded. Separators like spaces, colons, and hyphens are stripped before decoding.