Text to binary
Convert text to binary and back: UTF-8 byte by byte, with 8-bit padding, 4/8-bit grouping and separator options plus a hex and per-byte reference table — Chinese and emoji are handled as proper multi-byte sequences.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
Enter some content to see the result
0 bits · 0 bytes
What this tool does
- Find out what a blob of binary really is: paste it in and get the text back, with Chinese and emoji decoded correctly as multi-byte sequences.
- Turn text into binary to explain encoding to a class or a colleague, and use the per-byte table to show that one Chinese character takes three bytes.
- Debug encoding problems: how many bytes a string really occupies and what its UTF-8 hex looks like, without guessing inside a debugger.
- Control the output: pad every byte to 8 bits, group by 4 or 8 bits, and separate bytes with spaces, newlines or nothing.
Example
Input
Hi 你
Output
01001000 01101001 00100000 11100100 10111101 10100000
The hex reference is 48 69 20 E4 BD A0: the space (0x20) is one byte, while 你 (U+4F60) takes three bytes in UTF-8.
Frequently asked questions
Binary to text says "not valid binary". What should I check?
Two things: the string may only contain 0, 1 and whitespace, and once whitespace is removed the length must be a multiple of 8. Copy-paste often drops or adds a digit, or sneaks in full-width digits.
Why does one Chinese character become three binary groups?
Because the text is UTF-8 encoded first and then converted byte by byte, and a common Chinese character occupies 3 bytes in UTF-8, which is three 8-bit groups. An ASCII character takes a single byte.
What happens if I turn off "pad every byte to 8 bits"?
Each byte is then written with only its significant bits, so 65 becomes 1000001 (7 bits). It is shorter to read, but pasting it back fails because the length is not a multiple of 8 — use it for display only.
What if the bytes are not valid UTF-8?
You get "these bytes are not valid UTF-8 text". Decoding uses the strict mode of the UTF-8 decoder, so a truncated multi-byte sequence raises an error instead of being silently replaced with replacement characters.
Keywords:binary二进制文本转二进制text to binaryutf-8hex十六进制分组编码