Hex Encoder and Decoder

Look at the exact bytes behind a piece of text, or turn a hex dump back into words. Text is encoded as UTF-8, so accented letters and emoji show up as their multi-byte sequences. The decoder accepts hex in most common styles and tells you if the bytes are not valid UTF-8.

Encoding & Security Runs in your browser

Encode or Decode Hex

Direction

How to Use the Hex Encoder/Decoder

  1. Choose Text to hex or Hex to text.
  2. For encoding, pick a separator and letter case.
  3. Type or paste the input; the result updates as you type.
  4. Copy the result.

About This Tool

Developers debugging protocols and encodings, embedded engineers writing byte arrays, and students learning how UTF-8 works.

Input: Text or hex  ·  Output: Hex or text.

Features and Limitations

Features

  • UTF-8 encoding, so every character is supported.
  • Five output styles including C-style 0x lists and \x strings.
  • Lenient decoding: spaces, colons, commas, dashes, 0x and \x are ignored.
  • Clear errors for odd digit counts, non-hex characters and invalid UTF-8.

Limitations

  • Only UTF-8 text is supported; bytes in other encodings (such as Windows-1252) are reported as invalid.
  • Binary data that is not text cannot be shown as characters.
  • Results are computed in your browser; nothing you enter is sent to a server.

Example

“Hi!” encodes to 48 69 21; “é” becomes two bytes, c3 a9.

Frequently Asked Questions

Why does one character become several hex bytes?

UTF-8 uses one byte for ASCII and two to four bytes for other characters, so é is c3 a9 and 😀 is f0 9f 98 80.

Can I paste a hex dump with spaces and 0x prefixes?

Yes. Spaces, line breaks, colons, commas, dashes, 0x and \x are ignored when decoding.

What does “not valid UTF-8” mean?

The bytes do not form valid UTF-8 text. They may be binary data or text in another encoding.

Is my input sent anywhere?

No. Conversion happens in your browser.

Related Tools

More like this: all Encoding & Security tools, all Developer & Web tools or the TinySandy home page.