Skip to content

Hex to Text Converter

Convert hexadecimal bytes into readable ASCII or UTF-8 text instantly. Accepts spaced, comma-separated, 0x-prefixed, or continuous hex.

How to Convert Hex to Text

Hexadecimal text encodes each byte of a string as two hex digits. To read it back:

  1. Remove any separators or 0x prefixes so you have a continuous hex string
  2. Split it into pairs of two hex digits, one pair per byte
  3. Convert each pair to its decimal byte value (00-FF → 0-255)
  4. Decode the byte sequence as UTF-8 to get the characters

Example: Decode 48 65 6C 6C 6F:

  • 48 = 72 = H, 65 = 101 = e, 6C = 108 = l, 6C = 108 = l, 6F = 111 = o
  • Result: Hello

Code Examples

const hex = "48656c6c6f";
const bytes = hex.match(/.{2}/g).map((h) => parseInt(h, 16));
new TextDecoder().decode(new Uint8Array(bytes)); // "Hello"

Frequently Asked Questions

How do I convert hex to text?

Split the hex string into two-digit pairs, convert each pair to its byte value, then decode the bytes as text. For example, 48 65 6C 6C 6F decodes to Hello.

What input formats are accepted?

You can paste hex with spaces (48 65), commas (48,65), 0x prefixes (0x48 0x65), or as one continuous string (4865). Separators and whitespace are ignored automatically.

Why do I get an error?

Text decoding needs whole bytes, so the input must have an even number of hex digits and contain only 0-9 and A-F. Odd-length or invalid input shows a clear error instead of a wrong result.

Does it support UTF-8 and emoji?

Yes. The bytes are decoded as UTF-8, so multi-byte characters, accented letters, and emoji all appear correctly when you supply the right byte sequence.

Related Tools