Skip to content
Test versionSearch

Developer tools

Strict UTF-8 text and hex byte codec

Convert text to hex UTF-8 bytes or decode valid hex back to text. Invalid byte sequences and stray input characters cause a refusal instead of silent repairs.

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.

Text to encode: at most 400 UTF-16 units. Hex to decode: at most 500 units, so accepted encoded output can be decoded again. No control characters or unpaired surrogate. Each output row at most 500 characters; larger expansions refuse. Processing stays in this page; no external request, automatic storage or rendering input as HTML. Hex decode accepts compact even-length digits or space-separated two-digit bytes with optional per-byte 0x. No junk is discarded; invalid UTF-8 refuses. A UTF-8 BOM is preserved. Text bytes, not integer-base conversion.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Own bounded text transformations: URL contexts, UTF-8 bytes, one-pass entity subset, scalar inspection/composition and basic Greek lookup. Text to encode: at most 400 UTF-16 units. Hex to decode: at most 500 units. No control characters or unpaired surrogate. Each output row at most 500 characters; larger expansions refuse. Processing stays in this page; no external request, automatic storage or rendering input as HTML. Hex decode accepts compact even-length digits or space-separated two-digit bytes with optional per-byte 0x. No junk is discarded; invalid UTF-8 refuses. A UTF-8 BOM is preserved. Text bytes, not integer-base conversion.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Direction
Encode
Encoded byte layout
Compact hex
Text or strict hex bytes
Aรค๐Ÿš€

Result

Encoded bytes
41C3A4F09F9A80
Byte count
7
Code point count
3

Frequently asked questions

How do I convert text to UTF-8 hex bytes?

The strict UTF-8 text and hex byte codec encodes the entered text as UTF-8 bytes in hexadecimal, either compact or as separate bytes. The example encodes the text Aรค๐Ÿš€.

How do I decode hex bytes back to text?

Switch the codec to decode and enter compact even-length hex digits or space-separated two-digit bytes, optionally with 0x before each byte. Valid UTF-8 is turned back into text.

What happens with invalid UTF-8 bytes?

The codec refuses them instead of repairing them silently. No junk characters are discarded, and invalid byte sequences or stray input characters cause a refusal.

How long can the text or hex input be?

Text to encode may have at most 400 UTF-16 units and hex to decode at most 500 units, so accepted encoded output can be decoded again. Each output row is limited to 500 characters.

Does the UTF-8 codec keep a byte order mark?

Yes. A UTF-8 BOM is preserved when decoding.

Is the UTF-8 hex codec a number base converter?

No. It converts text bytes, not integers between number bases. Control characters and unpaired surrogates are not accepted.