Skip to content
ToolMug

Text to Hex Converter

See the UTF-8 bytes behind any text as hexadecimal, or paste hex to decode it into text. Both sides are editable, and the byte list accepts spaces, commas, 0x and \x prefixes or one continuous string.

Runs in your browser — nothing you enter is uploaded

How to use

  1. Type text on the left to get its bytes on the right, or paste hex on the right to decode it.
  2. Choose the separator, and whether to add 0x prefixes or use upper case.
  3. Switch the base to decimal, octal or binary if you need another notation.
  4. Copy either side.

Options explained

Separator
Space gives 48 65 6c 6c 6f, None gives 48656c6c6f and Comma gives 48, 65, 6c, 6c, 6f — handy for code arrays.
0x prefix
Writes each byte as 0x48, the notation used in C, JavaScript and many other languages.

Examples

Text Hex (UTF-8)
Hello 48 65 6c 6c 6f
é c3 a9
中 e4 b8 ad

Frequently asked questions

Which character encoding is used?

UTF-8, the standard for the web. ASCII characters take one byte each; accented letters take two, Chinese characters three, and emoji four.

What happens with hex that is not valid UTF-8?

The readable parts are decoded and invalid sequences are shown as the replacement character �, with a warning.

Is my text uploaded?

No. Conversion runs in your browser.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools