Text to base encoder
Encode text into base 2–36 digit strings through its UTF-8 bytes (with optional fixed byte width, delimiter and letter case), and decode those strings back to text. It works on character encoding, not on numeric base conversion.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Non-ASCII characters are split into UTF-8 bytes first: one Chinese character is 3 bytes.
When encoding, pad each byte to the number of digits that base needs (hex uses 2); when decoding, split the string by that same width.
Result
Updates live with your input and options; copy it or paste it back to decode.
Enter text to see the result
Characters: 0 · Bytes: 0 · Base: 16
What this tool does
- Turn Chinese text into a hex byte string (e4 b8 ad…) for config files or protocol docs that need escaping
- Encode text as binary or base36 digit strings for encoding practice, checks or light obfuscation
- Decode a digit string back into readable text to check whether it really is UTF-8 or something else
Example
Input
中文
Output
e4 b8 ad e6 96 87
The example uses the defaults: hexadecimal, two fixed digits per byte, space separated.
Frequently asked questions
How is this different from a numeric base converter?
This tool encodes characters: the text is first split into UTF-8 bytes and each byte is written in the target base. So A is 41 in hex and 中 is e4 b8 ad (three bytes). If you want the decimal number 255 as ff, use a numeric base converter instead.
What does "fixed byte width" do?
Each byte is padded to the number of digits that base needs for 0–255: 2 for hex, 8 for binary, 3 for octal, 2 for base36. That way the decoder can split without a delimiter, and the output lines up nicely.
Why does decoding report delimiter-required?
Without a delimiter there is no way to know where one byte ends, so decoding needs "fixed byte width" to split by width, or a delimiter such as a space, comma, hyphen or line break.
What do invalid-digit and invalid-utf8 mean?
invalid-digit means the string contains a character the chosen base does not allow (a g in hexadecimal, for example). invalid-utf8 means the bytes cannot form valid UTF-8 text — usually because numbers wider than two hex digits were treated as single bytes, or content from another encoding got mixed in.
Does it handle emoji and non-Chinese scripts?
Yes, everything goes through UTF-8: emoji take 4 bytes, and Japanese, Korean or accented Latin characters each have their own byte sequence. Encoding followed by decoding restores the original text character by character.
Keywords:text to binarytext to base36txt-convert