Hex to Text Converter

Turn hexadecimal bytes into readable text, or turn text into hex, with the direction detected for you. It reads spaced, packed, comma-separated and 0x-prefixed hex, and everything runs privately in your browser.

Hex to Text ConverterPrivate · runs on your device
Input
Words 0Characters 0Lines 0
Result

Example: Hi → 48 69

How to use the hex to text converter

You can paste hex straight from a log, a debugger or a packet capture, because the tool cleans the input before it decodes.

  1. Paste or type into the Input box.
  2. Leave Mode on Auto detect, or choose Text to code or Code to text to force a direction.
  3. For hex output, tick or untick Space between bytes. On gives 48 69, off gives 4869.
  4. Read the result. Hex digits are written in capitals.
  5. Press Copy, Download .txt or Use as input to take the result further.

Before decoding, the tool removes 0x prefixes and any spaces, commas, colons, semicolons or hyphens, so 48 69, 4869, 0x48,0x69 and 48:69 all read as the same two bytes. Auto detect treats the input as hex only when what remains is hex digits, an even number of them, and at least two.

How hex maps to bytes

Hexadecimal is base 16, using 0 to 9 and then A to F for ten to fifteen. One hex digit is exactly four bits, so a byte is always two digits. Work one out by hand: 48 is 4 x 16 + 8 = 72, the letter H. That is why 48 65 6C 6C 6F reads as Hello. Decoded bytes are interpreted as UTF-8, so C3 A9 returns é rather than two stray symbols.

HexMeaning
20space
0Aline feed (new line)
30 to 39digits 0 to 9
41 to 5Acapitals A to Z
61 to 7Alower-case a to z
E2 82 ACthe euro sign
F0 9F 98 80a grinning face emoji

Any byte from 80 upwards belongs to a multi-byte UTF-8 sequence and cannot stand alone as a character.

When auto detect guesses wrong, and other pitfalls

Ordinary words made only of the letters A to F, such as face, dead or cafe, also look like hex, so Auto detect decodes them into two bytes and you may see replacement characters. Set Mode to Text to code when you want to encode a word like that.

  • Odd digit counts. In Code to text mode a stray final digit is dropped, so 486 gives H. Count your digits.
  • Wrong encoding. The decoder reads UTF-8 only. A lone E9 from a Latin-1 file shows as a replacement character, not é.
  • Colours and numbers. A web colour such as #48656C is three channel values, not text, so open it in the colour picker. A hex number such as FF belongs in the number base converter.

Backslash escapes need care. Pasting \x48\x69 with Mode on Auto detect gets encoded as text, because the backslashes and x characters are not hex. Set Mode to Code to text and the non-hex characters are skipped, giving Hi. The same applies to a dump that includes offset columns: the offsets are decoded as bytes too, so remove them first.

It takes pasted text, not files, and does not show a dump with offsets or an ASCII column beside the bytes. Output is shown in one block, so for very long dumps copy it into an editor.

Where hex strings turn up

Hex is the usual way to show raw bytes to people. Packet captures and serial logs print payloads as hex, firmware tools list configuration bytes, and HTML, CSS and JavaScript use hex codes in character escapes. Security work reads file headers and memory in the same notation. Puzzles and capture-the-flag challenges often hide a clue as a run of hex pairs. To see the same bytes as ones and zeros use the binary translator, and for a compact text form of bytes see the Base64 encoder.

Worked example in the other direction: encoding Hello gives 48 65 6C 6C 6F with spaces and 48656C6C6F without. Encoding 4869 as text gives 34 38 36 39, because the characters 4, 8, 6 and 9 are themselves bytes. That is the difference between hex that represents text and text that happens to look like hex, and it is why the Mode setting exists.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

How do I convert hex to text?

Paste the hexadecimal into the Input box with Mode on Auto detect. Spaces, commas, line breaks and 0x prefixes are removed, each pair of digits becomes one byte, and the bytes are decoded as UTF-8. If detection fails, choose Code to text.

What does 48 65 6C 6C 6F mean in hex?

It spells Hello. The byte 48 is H, 65 is e, 6C is l (twice) and 6F is o. These are the ASCII codes of the letters written in base 16. Paste the sequence into the converter to confirm the result.

Is hex the same as ASCII?

No. ASCII is a table that gives each character a number, while hex is a way of writing numbers in base 16. Converting hex to ASCII means reading each pair of digits as a number and looking up the character, which this tool does using UTF-8.

Why does my decoded hex show strange symbols?

The bytes may not be text at all, as with images and compressed files, or they may use another encoding such as Latin-1, which is not valid UTF-8. An odd digit count also loses the last digit, so check that your hex has complete pairs.

Does the converter handle uppercase and lowercase hex?

Yes. 4A and 4a mean exactly the same value, so you can paste either. When converting text to hex the output is always in capitals. The case of hex digits changes only how the data looks, never what it is.