Hex to Text Converter
NewConvert hexadecimal values into readable text. Paste hex bytes as a continuous string, with spaces, 0x prefixes or \x escapes. Choose UTF-8, UTF-16 or Latin-1 to decode the bytes directly in your browser. Use Try an example to test the decoder.
How to convert hex to text
- Enter or paste the hexadecimal data.
- Select the character encoding used to create the bytes. UTF-8 is the usual choice.
- Read the decoded text and copy it, or inspect the bytes in the hex dump.
- Select Convert to hex to open the reverse converter with the decoded text already filled in.
For example, the hex string 48 65 6c 6c 6f decodes to Hello in UTF-8. The bytes c3 a9 decode to é in UTF-8, while the byte e9 represents é in Latin-1.
Supported hexadecimal formats
The converter accepts upper- and lowercase hexadecimal digits in common formats:
| Format | Example |
|---|---|
| Continuous string | 48656c6c6f |
| Space-separated bytes | 48 65 6c 6c 6f |
| Colon-separated bytes | 48:65:6c:6c:6f |
0x prefixes | 0x48, 0x65, 0x6c |
| Escaped bytes | \x48\x65\x6c |
Commas, dashes, semicolons and line breaks may also separate bytes. Invalid hex or incomplete groups are reported instead of silently discarded. If you paste a full xxd dump, remove its offset and ASCII columns first; this tool expects hexadecimal byte values rather than a complete dump.
Choosing the correct character encoding
Hexadecimal describes bytes, not the characters they represent. Decoding requires the correct character encoding.
| Encoding | Example for Hé | Typical use |
|---|---|---|
| UTF-8 | 48 c3 a9 | Web pages, JSON, APIs and modern text files |
| UTF-16 LE | 48 00 e9 00 | Some Windows files and software |
| UTF-16 BE | 00 48 00 e9 | Some data interchange formats |
| Latin-1 | 48 e9 | Legacy Western European data |
If decoding fails or the result looks incorrect, verify the encoding. A UTF-8 sequence such as c3 a9 means é in UTF-8 but displays differently in Latin-1. Not every byte sequence represents valid text; it could be binary data. The converter reports malformed UTF-8 instead of silently replacing it.
Common decoding problems
- Odd number of hex digits:
48656c6c6f0contains an incomplete final byte; each full byte needs two hexadecimal digits. - Invalid characters:
48 6Gis not valid hexadecimal becauseGis outside0–9andA–F. - Wrong encoding:
48 00 69 00isHiin UTF-16 LE, but contains null bytes when interpreted as UTF-8.
Reading the hex dump
The hex dump shows byte offsets, hexadecimal byte values and printable ASCII characters. A non-printable byte appears as a dot.
00000000 48 65 6c 6c 6f |Hello|
Decode hex from the command line
echo '48656c6c6f' | xxd -r -p
# Hello
In Python:
bytes.fromhex('48 65 6c 6c 6f').decode('utf-8')
# 'Hello'
Frequently asked questions
Is hex to text the same as hex to ASCII?
No. Hexadecimal is a way to display numeric byte values in base 16. ASCII maps characters to numeric codes. For example, the ASCII byte for H is 72 in decimal, or 48 in hex.
Why does the decoded text look wrong?
The original bytes may use a different encoding, or they may represent non-text data. Try the correct encoding and inspect the hex dump.
Can I decode hex with spaces or 0x prefixes?
Yes. The converter supports continuous hex, separators, 0x prefixes and backslash-x escape sequences.
Is the conversion performed locally?
Yes. The converter processes input in your browser. Avoid sharing sensitive data using prefilled URL parameters, since URLs may be logged or saved in history.
Related tools
- Text to Hex Converter — Convert readable text into hexadecimal bytes.
- Base64 Encoder and Decoder — Encode and decode text using Base64.
- URL Encoder and Decoder — Encode special characters for URLs.
Further reading
Last updated: