Friday, November 6, 2026 · Asia/KarachiFree tools · No signup · Runs in your browser

Hex to Text Converter

Hex to text treats pairs of hex digits as UTF-8 bytes and decodes them. The bytes 68 65 6c 6c 6f are the word hello. The other direction writes text as those pairs.

New

Hi in the text-to-hex direction is 48 69, two bytes, because those two letters are ASCII. An odd number of digits is an error. A byte sequence that is not UTF-8 is an error, not a string of replacement characters.

How to use

  1. Paste hex, or type text and switch the mode to text to hex.
  2. Press Convert. Spaces between bytes are allowed on the way to text.
  3. Reset restores 68 65 6c 6c 6f in the hex-to-text mode.

Formula / how it works

Decoding. Spaces, commas and a single leading 0x are removed. The remaining characters must be hex digits, and there must be an even count, because each byte is two digits. The bytes are decoded as UTF-8 with fatal errors, so a broken sequence stops the tool instead of inserting a question mark. hello’s five bytes are the familiar ASCII values. The text line is the decoded string and the byte count is the number of pairs.

Encoding. Text is turned into UTF-8 and each byte is two lowercase hex digits separated by a space. Hi is 48 69. A character outside ASCII becomes several pairs, one per UTF-8 byte, and the byte count is larger than the character count. There is no newline added at the end. If you hash or compare the hex, do not let a trailing space sneak in. The mode line tells you which direction ran, so a copied result is not ambiguous.

What this is not. It is not a hex editor for a file, and it is not a checksum. The MD5 tool hashes text and cannot reverse the hash. This page is reversible: hex to text and text to hex undo each other for the same bytes, aside from spacing you may have added.

Spaces and commas between bytes are optional on the way back to text. A leading 0x on the whole string is removed once, not on every byte. An odd count of digits is an error because a byte is two digits. UTF-8 is strict: a stray continuation byte fails instead of becoming a replacement character. Text to hex always emits lowercase digits separated by single spaces, one pair per byte, including a multibyte character as several pairs.

Compare a round trip on a word you know. Encode Hi and you should see 48 69. Decode 48 69 and you should see Hi. If a round trip adds a character, a space or a newline was in the box. The byte count is the quickest way to see that. Two letters of ASCII are two bytes. A single emoji can be four bytes and will show as four pairs. That is UTF-8, not a bug. Do not paste those pairs into a tool that expects one pair per character. Lowercase output is stable, so a diff of two encodings does not flap between A and a. Compare the byte count before you compare the letters if a round trip looks one character long.

A leading 0x is stripped once from the whole string, not from each byte. 0x6869 is Hi. 0x68 0x69 is not, because the second 0x is not at the start after spaces are removed in the way you might hope. Prefer plain pairs.

Worked examples

Five bytes that spell hello

Inputs: Text or hex: 68 65 6c 6c 6f | Mode: to-text

Leave the box as 68 65 6c 6c 6f and the mode on to-text, then press Convert. The text is hello.

Result: Mode: hex to text Text: hello Bytes: 5

Hi into two bytes

Inputs: Text or hex: Hi | Mode: to-hex

Type Hi and set the mode to to-hex, then press Convert. The hex is 48 69.

Result: Mode: text to hex Hex: 48 69 Bytes: 2

Use cases

  • Reading a short hex dump of ASCII.
  • Writing a word as spaced hex pairs.
  • Rejecting an odd number of digits instead of guessing a nibble.
  • Rejecting bytes that are not UTF-8.

Tips & limitations

  • Spaces between bytes are fine when decoding.
  • An odd length is an error.
  • Encoding uses lowercase and single spaces.
  • A non-ASCII character becomes more than one pair.

FAQ

Why is 68 65 6c 6c 6f the word hello?

Those are the ASCII bytes for h, e, l, l and o, written as hex.

Can I leave the spaces out?

Yes, when decoding. Spaces and commas are removed before the digits are paired.

What if the number of digits is odd?

The tool stops. A byte is two digits, so a leftover digit is not a byte.

What if the bytes are not text?

UTF-8 decoding is strict. A broken sequence is an error rather than a replacement character.

Does text to hex add a newline?

No. You get the pairs and the byte count, nothing else on the hex line.

Is the text uploaded?

No. Encoding and decoding run in the browser.

Runs entirely in your browser; nothing is uploaded. Check the output before you rely on it in production code, data or security decisions.