0️⃣ Text to Binary & Hex Converter
Convert plain text to binary or hexadecimal (using UTF-8 byte values), or decode binary/hex back into text. Bytes can be separated by spaces.
Text becomes UTF-8 bytes first
There is no "binary alphabet". The text is encoded to UTF-8 bytes, and each byte is then printed in base 2 or base 16:
H -> 72 -> 01001000 -> 48
e -> 101 -> 01100101 -> 65
Hello -> 48 65 6c 6c 6f
Binary bytes are always padded to eight digits and separated by a space, so five
letters give exactly 40 bits. Hex comes out in lowercase, two digits per byte.
Both formats are byte counts, not letter counts: café is four
characters but five bytes, because é is c3 a9, and an emoji
such as 😀 is four bytes (f0 9f 98 80).
Decoding back, and what it rejects
- Binary must be spaced. Each group is 1 to 8 bits, so
1001000 1101001works even unpadded, but one unbroken 16-bit string is refused - the tool cannot tell where a byte ends. - Hex ignores spacing entirely. Groups are joined before
parsing, so
48656c6c6f,48 65 6C 6C 6Fand4865 6c6c6fall decode alike. Only the total digit count must be even. - Bytes must form valid UTF-8. Decoding is strict, so a stray
ff, or a two-byte sequence missing its partner, gives "not valid UTF-8 byte data" rather than question marks.
0a and a stray space into 20. Check
the end of your pasted text if you get one byte more than you expected.Frequently asked questions
How do you write "Hello" in binary?
01001000 01100101 01101100 01101100 01101111. That is one 8-bit byte per letter, using the ASCII values 72, 101, 108, 108 and 111.
Why does one emoji produce four groups?
UTF-8 uses one byte for ASCII, two for most accented Latin, three for CJK and four for emoji and rarer scripts. The converter shows bytes, so a single character can be up to four of them.
Can I convert binary to text without spaces between the bytes?
Not in binary mode: split it into 8-digit groups first. Hex has no such limit, since two digits always make one byte and the spacing is discarded before decoding.