Skip to content
CodeShift
Menu

Hex to Text Converter

Paste hex bytes to read them as text, or type text to see its hexadecimal bytes. Prefixes, colons and missing spaces are all handled.

Standard: UTF-8 (RFC 3629) · Base16 (RFC 4648 §8)Reviewed October 2026 · by The CodeShift DeskHow we translate
TexttoHexadecimal

What hexadecimal is

Hexadecimal (base 16) uses sixteen digits: 0–9 and then A–F for ten to fifteen. Because 16 is 2⁴, one hex digit stands for exactly four bits and two hex digits for one byte. That makes hex the standard shorthand for raw bytes in programming, network dumps, colour codes and file formats — far easier to read than a long run of binary. RFC 4648 §8 calls this encoding Base16.

HexDecimalBinaryHexDecimalBinary
000000881000
110001991001
220010A101010
330011B111011
440100C121100
550101D131101
660110E141110
770111F151111

How the converter works

Going from text to hex, each character is encoded as UTF-8 bytes (the encoding used by most web pages and files) and each byte is written as two hex digits. Basic English letters and punctuation are one byte each, identical to ASCII. Accented letters take two bytes, symbols such as € take three, and emoji take four. Going from hex to text, the converter strips prefixes and separators, pairs up the digits, and decodes the bytes as UTF-8. If the bytes are not valid UTF-8 — perhaps they are an image, or text in another encoding — you see � and a clear warning rather than mystery characters.

Worked example: “Code”

CharacterDecimalHexBinary
C674301000011
o1116F01101111
d1006401100100
e1016501100101

Take the first byte, 43. The left digit counts sixteens and the right digit counts ones: 4 × 16 + 3 = 67, the code for “C”. Each hex digit also maps directly onto four bits, so 4 = 0100 and 3 = 0011, which together make the binary byte in the last column.

Formats you can paste

  • Plain pairs: 48 65 6C 6C 6F or 48656c6c6f
  • C / JavaScript style: 0x48, 0x65, 0x6C
  • Escape sequences: \x48\x65\x6c
  • MAC-address style: 48:65:6C:6C:6F

Case does not matter, and line breaks are fine. When encoding, choose a separator and prefix to match the format you need, and tick Lowercase for output like 0x6c.

Hex is not encryption

Hex only changes how bytes are written, not what they are, so anyone can read hex-encoded text with a tool like this one. If you need to hide a message, see the Caesar or Vigenère ciphers (for puzzles — neither is secure for real secrets). For related conversions try the binary translator, the ASCII converter and the full ASCII table with hex values.

Hex you already use

  • Web colours. #FF6600 is three bytes — red FF (255), green 66 (102) and blue 00 (0) — which is why each colour channel runs from 00 to FF.
  • Unicode code points are written in hex: é is U+00E9 and € is U+20AC. Note that a code point is not the same as its UTF-8 bytes — € is U+20AC but its bytes are E2 82 AC.
  • Network hardware addresses (MAC addresses) are six bytes written as hex pairs separated by colons, a format this converter accepts.

Converting hex to text by hand

  1. Split the hex into pairs: 48 69.
  2. Convert each pair: the first digit × 16 plus the second digit, with A–F meaning 10–15. 4 × 16 + 8 = 72 and 6 × 16 + 9 = 105.
  3. Look up the numbers in an ASCII table: 72 is H and 105 is i, so the text is “Hi”.

Why exactly two digits per byte

A byte holds 256 values, from 0 to 255. Two hex digits give 16 × 16 = 256 combinations, from 00 to FF, so every byte fits in exactly two digits — no more, no less. That is why the converter pads small values with a leading zero (a line feed, code 10, is 0A, not A) and why an odd number of digits always means something is missing. Upper and lower case mean the same thing: 4F and 4f are both 79. Choose whichever your code style or file format expects.

Frequently asked questions

How do I convert hex to text?+

Split the hex into pairs of digits; each pair is one byte. Convert the pair to a number (48 hex = 72) and read the bytes as UTF-8. "48 65 6C 6C 6F" reads as "Hello".

What formats of hex does this accept?+

Pairs with or without spaces, colons or commas, upper or lower case, and 0x or \x prefixes — for example 48656c6c6f, 48:65:6C, 0x48 0x65 or \x48\x65.

Why does € turn into three hex bytes?+

The converter uses UTF-8. The euro sign is code point U+20AC, which UTF-8 stores in three bytes: E2 82 AC.

What does "odd number of hex digits" mean?+

Each byte needs exactly two hex digits. If the total is odd, one digit is missing somewhere; the converter ignores the last digit and tells you, rather than guessing.

Guides

More translators