Hex to Text Converter
The hex bytes 48 65 6c 6c 6f decode to the word Hello. This hex to text converter translates hexadecimal byte strings into readable text, and it also runs the process in reverse to turn plain text into hex. Enter a hex string or a line of text, choose a direction, and the tool returns the converted result along with a byte count. It accepts hex with or without spaces, commas, or 0x prefixes, handles both uppercase and lowercase digits, and decodes full UTF-8, so accented letters, punctuation, and emoji all survive the round trip. Hex shows up anywhere raw bytes need a readable form: network packet captures, API debug logs, firmware and memory dumps, and programming exercises that hand you a string of hex pairs instead of a sentence. Rather than converting each pair by hand with a lookup table, paste the whole string and read the decoded text immediately, or run the reverse direction to see exactly which bytes a piece of text produces before sending it to another system.
Quick answer
Computers store text as bytes, and hex is a compact way to write those bytes, two hex digits per byte.
Output
Hello
Bytes
5
What this tells you
- •Computers store text as bytes, and hex is a compact way to write those bytes, two hex digits per byte.
- •The letter H is byte 72 in decimal, which is 48 in hex.
- •Decoding reads each hex pair, converts it to a byte, and interprets the bytes as UTF-8 text.
- •Encoding runs the same steps backward, text to bytes to hex pairs.
- •A single hex pair always represents one byte, a value from 00 through ff, which is 256 possible values.
- •Plain ASCII characters like letters, digits, and punctuation each take one byte, but accented letters, many symbols, and emoji take two to four bytes in UTF-8.
- •The converter strips spaces, commas, and 0x prefixes from hex input automatically, so pasted output from another tool usually works without cleanup.
- •A failed decode almost always means the byte sequence is the wrong length or is not valid UTF-8, which is common with binary files or non-UTF-8 encodings.
How to Use
- 1Pick a direction, hex to text or text to hex.
- 2Paste your input. Hex can include spaces, commas, or 0x prefixes, which are stripped automatically.
- 3For hex to text, check that the digit count is even. Two hex digits make one byte, so an odd count means a byte got cut off somewhere.
- 4For text to hex, type or paste any text, including accented letters, symbols, and emoji.
- 5Read the converted output and the byte count below it.
- 6If hex refuses to decode, check for an odd digit count or bytes that are not valid UTF-8, since not every byte sequence is readable text.
How It Works
Formula
each byte = two hex digits, text = UTF-8(bytes)Hexadecimal is base 16, using the digits 0-9 and the letters a-f, and one byte, a value from 0 to 255, always fits in exactly two hex digits. Each digit in a pair represents a power of 16, so a pair reads as (first digit times 16) plus the second digit. The pair 48 means 4 x 16 + 8 = 72, which is the UTF-8 code for the letter H. A hex string decodes by splitting into consecutive two-digit pairs, converting each pair to its byte value with that formula, and reading the resulting byte sequence as UTF-8, the encoding behind almost all modern text, web pages, and APIs. Encoding text runs the same logic in reverse: each character becomes one or more UTF-8 bytes, and every byte is written out as a two-digit hex pair with a leading zero when needed.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
Decode a classic
Five bytes, one per letter: 48=H, 65=e, 6c=l, 6c=l, 6f=o.
Encode a word
c is 0x63, a is 0x61, t is 0x74.
Decode with 0x prefixes
Prefixes and spacing are cleaned up before decoding.
Encode a short phrase
Each character becomes one byte, including 20 for the space between the two words. Six characters produce exactly six hex pairs, since every byte here fits in the plain ASCII range.
Decode an accented character
The first three bytes, 63 61 66, are the plain ASCII letters c, a, and f. The last two bytes, c3 a9, form a single UTF-8 sequence for é, which needs two bytes because it falls outside the ASCII range.
Encode an emoji
Emoji sit far outside the ASCII range, so UTF-8 encodes this smiley as four bytes instead of one. The byte count confirms it: one visible character produces four hex pairs.
Common Characters in Hex
UTF-8 byte values for everyday characters.
| Character | Hex | Decimal |
|---|---|---|
| A | 41 | 65 |
| a | 61 | 97 |
| 0 | 30 | 48 |
| space | 20 | 32 |
| ! | 21 | 33 |
| ~ | 7e | 126 |
Common mistakes
- Pasting an odd number of hex digits. Bytes need two digits each, so a lone trailing digit means something got cut off.
- Confusing hex text encoding with hex numbers. 48 as a hex number is 72, but as an encoded byte it is the letter H.
- Expecting arbitrary bytes to decode. Random hex often is not valid UTF-8 text, and the converter reports it rather than guessing.
- Assuming one hex pair equals one visible character. An accented letter or emoji needs more than one pair, because UTF-8 spends extra bytes on characters outside the ASCII range.
- Mixing up hex numbers with hex byte strings. A color code like ff0000 is three raw bytes (ff, 00, 00), not the text encoding of anything meaningful, so decoding it as UTF-8 text will fail or return unreadable output.
Embed this calculator on your site
Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.
<script src="https://calctide.com/embed.js" data-tool="hex-to-text-converter" async></script>Preview the embed at /embed/hex-to-text-converter/.