jsonecho

Hex Encode

Turn any text into hexadecimal bytes, with the format you need.

Loading the tool...

How to use Hex Encode

  1. Paste or type your text.
  2. Choose a format and letter case.
  3. Copy the hex bytes.

About Hex Encode

Hexadecimal writes every byte as two digits, which makes it the usual way to look at raw data in debuggers, network traces and file dumps. This tool converts text to its bytes first (UTF-8, so accents and emoji work) and then prints each byte as hex.

Pick the format that matches where the result goes: plain spaces for reading, no separator for compact strings, or a 0x or \x prefix for source code and escape sequences.

Frequently asked questions

Why are some characters more than one byte?

Text is stored as UTF-8. Plain ASCII letters use one byte, while letters with accents use two and emoji use four.

What is the difference between 0x and \x?

0x is the prefix for hex numbers in most programming languages. \x is an escape sequence used inside strings, for example in C, Python and JavaScript.

Is hex a form of encryption?

No. It is only another way of writing the same bytes, and anyone can convert it back.

More in URL and Base64

All tools →