Hex Text Encoder Decoder

Encode text as UTF-8 hexadecimal bytes or strictly decode those bytes back to text.

Processing stays in this browser. Input limit: 50,000 UTF-16 code units. Unpaired surrogates are rejected; pasted line endings may normalize to LF.

Convert text using explicit UTF-8 bytes

Paste text and choose Process input to encode it as two-digit hexadecimal byte pairs. Enable Decode bytes to UTF-8 text for the opposite direction. This tool uses UTF-8, not ASCII-only conversion or UTF-16 byte serialization.

Example: one ASCII letter, an accent and an emoji

Load example (replaces input and mode) inserts Aé😀 and selects encoding. The result is 41 C3 A9 F0 9F 98 80: seven bytes for three Unicode code points. To reverse it, copy that encoded result into the input, enable decoding and process again. The output is the original text.

Strict decoding rules

Whitespace between encoded digits is ignored. After removing it, the digit count must form complete hexadecimal pairs. Prefixes such as 0x, commas, punctuation and incomplete bytes are rejected. Invalid UTF-8 sequences produce an error instead of inserting replacement characters. Overlong sequences, isolated continuation bytes and encoded surrogate values are not valid UTF-8.

A UTF-8 byte-order mark is preserved as U+FEFF on decoding rather than silently removed. A decoded control character may be invisible in the result textbox; use Unicode Code Point Inspector when visible text alone is ambiguous. Encoding and decoding change representation, not encryption or confidentiality.

Copy and export boundaries

The result download is UTF-8 TXT. Encoded output is ordinary ASCII digits and spaces; decoded output contains the decoded text. No final newline is added. Input supports 50,000 UTF-16 code units, so a large encoded result may exceed the decoder input limit even when the original source fitted. Process a smaller source in that case. Unpaired input surrogates are rejected because exporting them would otherwise replace data. Browser textareas can normalize pasted CRLF or CR to LF.

Use UTF-8 Byte Inspector for byte offsets and decimal values. Editing text or mode clears the prior output and download; nothing is uploaded or written back to the source file.