Skip to content

Hex to Text Converter

Embed

Paste this where you want Hex to Text Converter on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/hex-to-text/" width="100%" height="500" frameborder="0" loading="lazy" title="Hex to Text Converter"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/hex-to-text/">Hex to Text Converter</a> by BrowserUtils</p>

Convert between hexadecimal and text.Runs in this tab.

Next step

About Hex to Text Converter

Hex to text, one byte at a time

The encoder turns the text into UTF-8, then writes each byte as two uppercase hex digits with a space between bytes. “Hi” is two bytes:

Hi  →  48 69

“Hello” is five:

Hello  →  48 65 6C 6C 6F

A character outside ASCII takes more than one byte. é is the two bytes C3 A9, so “café” is five bytes:

café  →  63 61 66 C3 A9

The binary to text converter does the same split in base 2. The UTF-8 byte viewer shows the code point and the byte length of one character at a time.

What the decoder accepts

Set the mode to Hex to Text and paste 48656C6C6F. The output is Hello. The same digits with a space every two characters, 48 65 6C 6C 6F, decode to the same word.

A decode comes out wrong in a few predictable ways:

  • Spaces, commas, and line breaks are all separators, so 48 65 and 48,65 both decode to “He”.
  • A 0x prefix is removed before the digits are read. 0x48 0x69 decodes to “Hi”.
  • Upper and lower case are the same value. 6c and 6C are both the letter l.
  • One long run of hex, with no spaces, is split into pairs from the left.
  • An odd number of digits leaves the last digit as its own byte. 486 is the bytes 48 and 06, which is “H” followed by a control character.

The same conversion in code

' '.join(f'{b:02X}' for b in 'Hello'.encode())
bytes.fromhex('48 65 6C 6C 6F').decode()
[...new TextEncoder().encode('Hello')].map(b => b.toString(16).padStart(2, '0').toUpperCase()).join(' ')
new TextDecoder().decode(new Uint8Array('48 65 6C 6C 6F'.split(' ').map(h => parseInt(h, 16))))

Python’s bytes.fromhex rejects an odd number of digits. This page keeps the leftover digit as a one-digit byte, as with 486 above.

Questions

What is hexadecimal encoding?
Hexadecimal (base-16) represents each byte as two hex digits (00-FF). For example, the letter A is represented as 41 in hex.
What format does this tool use?
Hex bytes are separated by spaces (e.g., 48 65 6C 6C 6F). The tool accepts both uppercase and lowercase hex digits.
How do I decode a hex dump?
Paste the hex bytes separated by spaces into the input field and the tool will convert each byte pair back to its character representation.
Where is hex encoding commonly used?
Hex encoding is used in debugging (memory dumps, packet captures), color codes (#FF5733), MAC addresses, and when viewing raw binary data in a human-readable format.
How do I convert a hex color code to text?
Hex color codes like #FF5733 represent RGB color values, not text. This tool converts hex-encoded text strings (like 48 65 6C 6C 6F for "Hello"), not color codes.
Does the hex converter handle non-ASCII characters?
Yes, the tool supports multi-byte UTF-8 characters. Non-ASCII characters like accented letters or emoji will produce more than two hex digits per character.

More in Encoding & Decoding

All 20 encoding & decoding