decoder.tools

Hex to Text Decoder

Convert hexadecimal bytes to readable text. Spaces, colons and 0x prefixes are handled for you.

INPUT
OUTPUT

The result appears here as you type.

Decoding runs in your browser. What you paste is not sent to a server.

A hex decoder turns pairs of hexadecimal digits back into bytes and shows those bytes as text. 48 is the byte 72, which is the letter H.

Example

Input
48 65 6c 6c 6f 2c 20 77 6f 72 6c 64
Output
Hello, world

Separators don't matter. 48656c6c6f, 48:65:6c:6c:6f and 0x48 0x65 0x6c 0x6c 0x6f all decode the same way.

What is hexadecimal?

Hexadecimal (base 16) writes numbers with the digits 0–9 and a–f. One hex digit is exactly 4 bits, so one byte is always exactly two hex digits, from 00 to ff. That fixed width is why hex is the standard way to show raw bytes: in debuggers, packet captures, hash values, color codes and memory dumps.

Converting hex to text is two steps. First each pair of digits becomes a byte. Then the bytes are read as text using a character encoding. This tool uses UTF-8, which matches ASCII for the first 128 values, so English text decodes directly, and multi-byte sequences such as c3 a9 (é) come out correctly too.

Common hex values

HexCharacterNotes
20space
30–390–9digits
41–5aA–Zuppercase
61–7aa–zlowercase
0a / 0dline feed / carriage return0d 0a is a Windows line ending
00nulloften padding or a string terminator

How to use the hex decoder

  1. Paste the hex. Any separator works, and 0x prefixes are removed.
  2. Read the decoded text in the output panel.
  3. If you get an "odd number of hex digits" error, a digit is missing or an extra one slipped in, since every byte needs exactly two.

Convert hex to text in code

Python
print(bytes.fromhex("48 65 6c 6c 6f 2c 20 77 6f 72 6c 64").decode("utf-8"))  # Hello, world
JavaScript (Node.js)
console.log(Buffer.from("48656c6c6f2c20776f726c64", "hex").toString("utf8")); // Hello, world
Command line
echo '48656c6c6f2c20776f726c64' | xxd -r -p

Hex at a glance

Base16 (0–9, a–f, case-insensitive)
Digits per byte2
Text encoding usedUTF-8 (ASCII-compatible)
Size overhead100% (2 characters per byte)

Frequently asked questions

Why does my decoded hex show strange symbols?

The bytes aren't text in UTF-8. They might be a number, compressed data, a hash or text in another encoding such as Latin-1 or UTF-16. UTF-16 is easy to spot: every other byte is 00, as in 48 00 69 00.

Is hex encryption?

No. Hex is just a way of writing bytes. If the decoded result looks random, the bytes themselves are probably encrypted or hashed, and hex decoding can't undo that.

How do I convert text to hex?

Use the Hexdump viewer. It shows the UTF-8 bytes of any text as hex, with offsets and an ASCII column.

Last reviewed · found a mistake? contact@decoder.tools · view as markdown