How to use this tool
- Choose Encode text or Decode hexadecimal.
- Enter ordinary text for encoding. For decoding, enter complete byte pairs with optional spaces or line breaks; omit 0x prefixes.
- Select Convert text and hex. Review the UTF-8 byte count and copy the output.
Understanding the output
Encoding shows two uppercase hexadecimal digits per byte, separated by spaces. The byte count measures the UTF-8 representation, not the number of visible characters. Decoding returns text only when the complete byte sequence is valid UTF-8; an initial byte-order-mark character is preserved.
For a more compact text representation of the same UTF-8 bytes, use the Base64 Encoder and Decoder and select the alphabet your destination expects.
An ASCII greeting and an emoji
Hi 😀 encodes as 48 69 20 F0 9F 98 80, a total of seven UTF-8 bytes. Decoding those pairs returns the original greeting, including its space and emoji.
Why characters use different numbers of bytes
ASCII letters use one byte each in UTF-8, while many accented letters and other writing systems need more. An emoji can need four bytes, and a visible emoji sequence may combine multiple code points. The displayed byte count is therefore useful for inspecting payload size but should not be treated as a word count or a count of user-perceived characters.
Hexadecimal represents a byte with two digits from 00 to FF. It exposes the encoded values without relying on a font to display control characters or invisible whitespace. A space in the original text becomes byte 20; spaces between the displayed byte pairs are formatting separators.
Match the original character encoding
The same byte values can mean different characters under different encodings. This tool uses UTF-8 exclusively. Bytes copied from a legacy Windows code page, UTF-16 file, image, or compressed archive may be rejected or may produce unrelated text. Identify the original format before interpreting arbitrary binary data as a message.
Method and supported input
TextEncoder converts valid Unicode text to UTF-8. Decoding removes formatting whitespace, validates complete hexadecimal pairs, and uses a fatal UTF-8 decoder so malformed byte sequences produce an error rather than replacement characters.
- Hexadecimal input represents UTF-8 text rather than another binary format.
Limitations
- Only complete pairs of hexadecimal digits are accepted; prefixes, commas, and odd digit counts are rejected.
- Unpaired Unicode surrogates and invalid UTF-8 bytes are rejected. This is not a file converter.
Common questions
Why does FF fail to decode?
FF is a valid byte but cannot occur as a valid standalone UTF-8 sequence. Valid hexadecimal notation does not guarantee that its bytes represent UTF-8 text.
Can I paste continuous hexadecimal without spaces?
Yes. 4869 and 48 69 both decode to Hi. Whitespace separates the display but is not part of the bytes.
Is hexadecimal encoding encryption?
No. It changes the representation of the bytes and provides no secrecy or integrity protection.