Hex to Text Converter

Paste a hex string and read it as text — UTF-8 by default, or ASCII, Latin-1 and UTF-16. Spaces, colons, 0x and \x prefixes are all fine. Switch direction to turn text into hex. Nothing leaves your browser.

Byte table

What you can do here

Links: /hex-to-text?mode=text-to-hex opens the reverse direction and ?enc=utf-16le preselects an encoding.

How hex to text conversion works

Every two hex digits are one byte (00–FF). The bytes are then read with a character encoding. In ASCII and UTF-8 the letter H is byte 0x48 (72), so 48 65 6C 6C 6F is Hello. UTF-8 spends 2–4 bytes on characters outside ASCII: C3 A9 is é and E2 9C 93 is ✓. Read those same bytes as Latin-1 and you get é instead — the classic “mojibake” you see when the encoding is wrong.

The input is cleaned first: whitespace, commas, colons, dashes, 0x, \x, % and U+ prefixes are removed, leaving only hex digits. An odd number of digits is reported, because half a byte cannot be decoded.

ASCII hex reference

HexCharHexCharHexCharHexChar
20space30041A61a
21!3995AZ7Az
22"2C,2E.2F/
0Aline feed0Dcarriage return09tab00NUL
7B{7D}3A:40@

Worked example

hex    : 4E 65 61 74 4A 53 4F 4E 20 E2 9C 93
bytes  : 78 101 97 116 74 83 79 78 32 226 156 147
UTF-8  : NeatJSON ✓
Latin-1: NeatJSON ✓   (wrong encoding for these bytes)

Decoding hex in code

// JavaScript (browser or Node 18+)
new TextDecoder().decode(Uint8Array.from("48656c6c6f".match(/../g), h => parseInt(h, 16)));
# Python
bytes.fromhex("48 65 6c 6c 6f").decode("utf-8")
# Command line
echo 48656c6c6f | xxd -r -p

Common questions

How do I convert hex to text?

Paste the hex into the input. It is decoded as you type, two hex digits per byte, using UTF-8 unless you pick another encoding. Separators and 0x or \x prefixes are ignored.

What is the difference between hex to ASCII and hex to UTF-8?

For bytes 00–7F they are identical. Bytes 80–FF are not ASCII at all; in UTF-8 they combine into multi-byte characters like é or emoji. Choose ASCII to flag those bytes, UTF-8 to decode them.

Why do I see � or strange characters?

The bytes are not valid in the chosen encoding. � marks an invalid UTF-8 sequence, and the byte table highlights where it is. Try Latin-1 for legacy single-byte data, or UTF-16 if every other byte is 00.

Why does it say the hex has an odd number of digits?

Each byte needs exactly two hex digits, so an odd count means a digit is missing or extra. Check for a dropped leading zero, such as A instead of 0A.

How do I convert text to hex?

Click Text → Hex, paste the text, and pick a format: spaced bytes, one compact string, colons, 0x or \x escapes. The text is encoded with the selected encoding first.

Is my data uploaded?

No. Decoding uses the browser's built-in TextDecoder; nothing is sent to a server.