Skip to content
Jellykit

Text to Hex Converter

Turn text into its UTF-8 bytes in hex, binary, octal or decimal, and turn such numbers back into text.

  • Runs on your device
Loading tool

About Text to Hex Converter

Type or paste text and see every UTF-8 byte as a hexadecimal number, with the separator, 0x prefix and letter case you need for code, a protocol log or a bug report. The same tool writes binary, octal and decimal, and can give one number per character (its Unicode code point) instead of one per byte.

Switch the direction to read numbers back into text. Spaces, commas, colons, 0x, \x and % prefixes are all understood, and bytes that do not form valid UTF-8 are pointed out rather than silently dropped.

How it works

  1. Your text is encoded as UTF-8, the encoding used by the web and most files, so plain English letters take one byte and other characters take two to four.
  2. Each byte is written in the base you choose, padded to a fixed width (two hex digits, eight binary digits, three octal digits) so the output can be read back even without separators.
  3. With "One number per: Character" each character becomes its Unicode code point instead, so an emoji is one number rather than four bytes.
  4. Reading numbers back, the tool ignores separators and common prefixes, checks every value, and decodes the bytes as UTF-8, reporting where any invalid sequence starts.

Questions

Why does é turn into two hex numbers?

In UTF-8, characters outside basic ASCII take more than one byte: é is C3 A9 and most emoji take four bytes. Choose "One number per: Character" to get a single code point (E9) per character instead.

What input does the reverse direction accept?

Numbers separated by spaces, commas, colons, dashes or new lines, with or without prefixes such as 0x, \x or %. Fixed-width hex, binary and octal may also run together, as in 48656c6c6f.

What happens with bytes that are not valid UTF-8?

Each broken sequence is shown as the replacement character � and a note says how many there were and the byte position of the first one, so nothing is hidden.

How much text can it convert?

Up to 1 MB of input. In binary that already becomes about nine million characters of output, which is as much as a text box handles comfortably.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.