Skip to content
ToolPlankDEV
Encoders & Decoders
100% In-Browser Execution

Updated:

Hex to Text Converter

Paste hexadecimal and read it as text. This hex to text converter detects spaced bytes, 0x and \x escapes, % codes and xxd or hexdump lines, lets you choose the character set, points to the exact character if the hex is wrong and never uploads your data.

Options:

Hex

Input
0 chars · 0 lines

Text

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Notes

Notes about bytes that are not valid in the chosen character set appear here when there are any.

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use Hex to Text

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your hex

    Paste the hex into the left box, press Paste, or open a text file. Sample loads a byte list with accents, a euro sign and an emoji. The xxd dump and \x string buttons load two other shapes.

  2. 02

    Check what was detected

    The status line names the format the tool found, such as spaced bytes, a 0x list or an xxd dump, and counts the bytes and characters. If a character is not hex, the message names its line and column.

  3. 03

    Choose the character set

    UTF-8 is right for most text. Switch to ASCII, Latin-1 / Windows-1252 or UTF-16 when the bytes come from an older system or a Windows API. Turn on Show control characters to see invisible bytes.

  4. 04

    Copy or download

    Press Copy to use the decoded text, or Download to save it as decoded.txt.

How to convert hex to text

Hexadecimal writes each byte as two digits, 00 to ff. To convert hex to text, the tool turns every pair of digits back into a byte, then reads the bytes as characters in the character set you choose. The built-in sample is:

Text
48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 0a 43 61 66 c3 a9 20 e2 82 ac 35 20 f0 9f 98 80

Read as UTF-8, those 29 bytes give 23 characters over two lines:

Text
Hello, world!
Café €5 😀

Plain letters take one byte each, so 48 is H. The accent, the euro sign and the emoji take two, three and four bytes. That is why the byte count is higher than the character count.

Hex formats the converter reads

Hex shows up in many shapes, and most converters accept only one. This one detects the shape and tells you which it found. It reads:

  • Spaced bytes, one per line or in a row: 48 65 6c 6c 6f
  • Continuous digits: 48656c6c6f, also wrapped over several lines
  • 0x prefixes, with or without commas: 0x48 0x65 or {0x48, 0x65}, as in a C array, and a single 0x in front of a long run
  • \x escapes: \x48\x65, including a Python bytes literal such as b'\x48\x65' and quoted lines
  • Percent codes from a URL: %48%65%6c
  • SQL literals: X'48656C6C6F'
  • Separators of colons, dashes, commas or semicolons, as in a MAC address or a fingerprint
  • Dump output from xxd and hexdump -C, with the offset column and the text on the right removed

Letters can be upper or lower case. Mixed shapes are accepted too, and the status line says mixed. A group of one digit, such as 0xA, is read as 0A. The tool tells you when it did that.

Convert a hex dump from xxd or hexdump to text

Dump tools print an offset, the bytes and a text column. Paste the whole output and the tool keeps only the bytes. This input, written by xxd:

Text
00000000: 5468 6520 6b65 7920 6973 2073 6574 2e0a  The key is set..
00000010: 4361 6665 cc81 20e2 9c93                 Cafe.. ..

decodes to the line The key is set. followed by Café and a check mark. Here the letter é is written as e followed by a combining accent, which is why the bytes are cc 81. A line with only a star in hexdump output means repeated lines were skipped by hexdump itself. Those bytes are not in your paste, so the tool leaves them out and tells you.

Why you may see strange symbols

The same bytes give different text in different character sets. Take these six bytes:

Text
43 61 66 e9 20 80

In Windows-1252, the older Western European set, they read as Café followed by a space and a euro sign. In UTF-8 the byte e9 starts a three-byte character that never finishes, and 80 is a stray continuation byte. Each shows as the replacement character, so you see Caf followed by two replacement symbols. The note under the output counts them and suggests trying another character set.

If you pick ASCII, any byte above 7f cannot be a character and is shown as the replacement symbol too. UTF-16 reads two bytes for each character, and the order matters: 48 00 is H in little-endian and a different character in big-endian.

When the hex is wrong

A byte needs exactly two digits. If a group has three, the message names the line and column where the group starts. If a character is not hex, the message names it and its position. For the input 48 65 6c 6g it reads: Unexpected character "g" at line 1, column 11, with a reminder that hex uses 0 to 9 and a to f.

Text that is not hex at all often has a different cause. A string such as SGVsbG8= is Base64, which Base64 Decode handles. Text with percent signs inside a link is covered by URL Decode, and entities such as & by HTML Decoder.

Hex to text in Python, JavaScript and on the command line

In Python, bytes.fromhex ignores spaces and decode picks the character set:

Python
print(bytes.fromhex("48 65 6c 6c 6f").decode("utf-8"))

In Node.js, use a Buffer. On the command line, xxd reverses plain hex:

JavaScript
Buffer.from("48656c6c6f", "hex").toString("utf8")
Bash
echo 48656c6c6f | xxd -r -p

In Excel, HEX2DEC turns one byte into a number and CHAR turns that number into a character. That works for a single ASCII byte per cell, so longer text is easier to paste here. To go the other way, use Text to Hex. If you need to find odd characters in text you already have, Remove Unicode Characters can strip them.

Limits

  • The tool decodes bytes to text. It does not open binary files, so images or archives pasted as hex give meaningless characters.
  • Bytes that are not valid in the chosen character set show as the replacement symbol, and the original value cannot be recovered from the text.
  • Latin-1 here means Windows-1252, the set browsers use under that name. It differs from strict ISO-8859-1 only for the bytes 80 to 9f.
  • Hex shown as Unicode escapes such as \u0048, and numbers in other bases, are different formats and are not read.
  • Very large input is limited to 2,000,000 characters.

Your hex is decoded in your browser. It is not uploaded or stored. See the Privacy Policy for details.

Frequently Asked Questions

Technical Q&A for Hex to Text

Common questions about edge cases, character encoding, and privacy guarantees.

Every two hex digits are one byte, from 00 to ff. The tool turns each pair into a byte and reads the bytes as characters in the character set you choose, UTF-8 by default.

Paste the hex into the left box. The text appears on the right at once. Press Copy or Download to use it.

ASCII covers bytes 00 to 7f only, which is English letters, digits and punctuation. UTF-8 uses the same bytes for those and adds multi-byte sequences for accents, symbols and emoji. Choose ASCII to flag any byte above 7f.

The bytes are not valid in the character set you chose, so each bad byte shows as the replacement symbol. Try Latin-1 / Windows-1252 for older Western text, or UTF-16 if every second byte is 00.

Paste the whole dump. The offset column and the text column are removed automatically, and the status line says xxd dump or hexdump dump.

0x marks a number as hexadecimal, as in 0x48. It is not part of the value. The tool ignores it and reads the digits after it.

Call bytes.fromhex on the string, then decode, as in bytes.fromhex("48656c6c6f").decode("utf-8"). It accepts spaces between bytes.

Use HEX2DEC to turn one byte into a number and CHAR to turn the number into a character. That works for one ASCII byte per cell. For longer text or UTF-8 characters, paste the hex here instead.

Yes. Colons, dashes, commas, semicolons, spaces and line breaks all count as separators, so a string such as 48:65:6c:6c:6f works.

No. The decoding runs in your browser and nothing is sent to a server, which matters when the hex comes from logs that hold secrets.