Hex Encoder

Convert text into hexadecimal bytes — or hex back into text — with the separator and letter case you need.

● Your data is processed locally in your browser and is never uploaded to our servers.

How to convert text to hex

  1. Choose the direction: Text → hex or Hex → text.
  2. Choose the separator: space (48 65), none (4865), colon (48:65), 0x prefix (0x48, 0x65) or \x escapes (\x48\x65).
  3. Choose UPPERCASE or lowercase letters.
  4. Paste your input and click Convert.

How text becomes hex

Each character is first encoded in UTF-8, then each byte is written as two hex digits. Basic English letters, digits and symbols take one byte; accented letters take two; emoji take four:

TextHex (UTF-8)
A41
a61
Hello48 65 6C 6C 6F
(space)20
(new line)0A
éC3 A9
€E2 82 AC
😀F0 9F 98 80

Which separator should I use?

Hex to text

Paste hex bytes with or without separators and choose Hex → text. The bytes are decoded as UTF-8. If the result shows strange characters (like é), the original text was probably in another encoding, such as Windows-1252.

In code

Python: "Hello".encode().hex() → '48656c6c6f', and bytes.fromhex("48656c6c6f").decode() → 'Hello'. JavaScript: [...new TextEncoder().encode("Hello")].map(b => b.toString(16).padStart(2, "0")).join(""). Command line: xxd or hexdump -C.

FAQ

Is hex encoding encryption?

No. Hex is just another way to write bytes: anyone can decode it. To protect data, use the AES Encrypt tool.

Hex or Base64?

Hex doubles the size (2 characters per byte) but is easy to read; Base64 is more compact (4 characters per 3 bytes).

How do I see each character's code number?

Use Text to ASCII for decimal codes and Unicode code points, or Text to Binary for bits.