Development and data

How to represent text bytes in hexadecimal

Hexadecimal writes each byte using two digits. It helps inspect encodings, but does not make content secret.

Before you start

Text is processed in the browser. Consider the content before using it and read the privacy policy.

Privacy

How to use it

  1. Enter café and encode it as hexadecimal.

  2. Enter 63 61 66 C3 A9 and decode it to text.

  3. Try decoding F: one digit does not make a byte and is rejected.

Hexadecimal Encoder

Worked example

The letters c, a and f use one byte each; é uses two UTF-8 bytes, C3 A9.

Result: café → 63 61 66 C3 A9 → café.

RFC 3629: UTF-8

Limits and checks

The tool handles UTF-8 text, not files, and ignores whitespace between hexadecimal digits when decoding. An odd number of digits, invalid characters or bytes that are not valid UTF-8 produce an error. Limit: 100,000 UTF-16 code units.

Next step

For another representation of the same bytes, see the Base64 example.

Base64 is not encryption: how to encode sample text
Back to the blog