Binary Text Encoder/Decoder - Text to Binary & Back
Encoding Tools
Convert UTF-8 text to binary or decode it back. View bytes in hex, decimal, and octal, choose separators, and convert privately in your browser.
UTF-8 byte formats
Byte grid
Each 8-bit card is a UTF-8 byte; cards are grouped by Unicode character.
Showing the first 8 of 13 characters (8 UTF-8 bytes shown).
How to use this tool
- Enter input. Type text or paste binary data. The direction is auto-detected.
- Choose separator. Select space, comma, or none as the separator between binary groups.
- Read output. The converted output appears instantly in the output box.
- Copy result. Click Copy to copy the result, or Swap to translate back.
How binary text encoding works
Every character in digital text is stored as one or more bytes (8 bits). This tool converts
text using UTF-8 encoding (the dominant character encoding for the web), then represents
each byte as an 8-bit binary number (e.g.,
A = 65 = 01000001).
A character and a byte are not always the same thing. The letter é takes two UTF-8 bytes, while the emoji 😀 takes four. The byte grid groups those bytes under the character that produced them, so every bit cell corresponds to one real byte in the converter output.
The UTF-8 byte formats panel shows those same values in binary, hexadecimal, decimal, and
octal. For example, the byte for A is 01000001 in binary,
41 in hexadecimal, 65 in decimal, and 101 in octal. Comparing
these forms is useful when reading a protocol trace or checking an assignment that specifies a number
base.
Common binary values
A=01000001(decimal 65)Z=01011010(decimal 90)a=01100001(decimal 97)0=00110000(decimal 48)- Space =
00100000(decimal 32)
Use cases
- Education: understand how computers store text at the bit level.
- Puzzles and ciphers: encode messages in binary for challenges or games.
- Low-level debugging: inspect raw byte values of a string.
- Protocol analysis: visualize binary framing in communications protocols.
Multi-byte UTF-8 characters
ASCII characters (code points 0–127) each fit in a single byte. Characters outside this range require multiple bytes in UTF-8. For example:
- é (U+00E9) encodes as 2 bytes:
11000011 10101001(0xC3 0xA9) - € (U+20AC) encodes as 3 bytes:
11100010 10000010 10101100 - 😀 (U+1F600) encodes as 4 bytes, starting with
11110000
The leading bits of the first byte signal how many bytes form the sequence: 110…
= 2 bytes, 1110… = 3 bytes, 11110… = 4 bytes. Continuation bytes always
begin with 10….
Bit numbering convention
This tool displays bits in MSB-first (most significant bit first) order, which is the standard for written binary representation. Bit 7 (value 128) is on the left; bit 0 (value 1) is on the right.
Some hardware protocols and embedded systems datasheets use LSB-first (least significant bit first) ordering instead. If you are comparing output with a hardware datasheet, verify the bit order used before drawing conclusions.
When decoding, enter complete 8-bit groups separated by spaces or commas, or use the compact option for a continuous stream that can be split every eight bits. The decoder rejects partial and oversized groups, and it reports malformed UTF-8 instead of silently replacing invalid bytes. The displayed byte values are still available in all four bases for inspection.
Frequently asked questions
How does text-to-binary conversion work?
Text is first encoded to UTF-8 bytes using the standard TextEncoder API. Each byte (0–255) is then converted to its 8-bit binary representation (e.g., the letter "A" = byte 65 = 01000001). Bytes are joined using your chosen separator.
Can I convert non-ASCII characters?
Yes. UTF-8 encoding is used, so any Unicode character (emoji, accented letters, CJK characters, etc.) can be encoded. Multi-byte characters will produce multiple 8-bit groups in the binary output.
What separator should I use?
Space is the most readable and the default. Use comma for CSV-style output, or none for a compact bitstream. When decoding, match the separator to the input; space mode also accepts commas. The tool accepts optional 0b prefixes, requires each group to contain exactly 8 bits, and splits compact input every 8 bits.
Why does binary look different for the same character in some tools?
Some tools use ASCII (7-bit) encoding which produces 7-bit groups; this tool uses UTF-8 (8-bit groups) which is compatible with ASCII for standard Latin characters. Emoji and other Unicode characters require more than one byte in UTF-8.
More byte and character tools
- ASCII TableLook up the ASCII character and decimal value for a single byte.
- Hex Dump ViewerInspect a longer byte sequence as hex values with offsets and printable text.
- Number Base ConverterConvert individual values between binary, octal, decimal, and hexadecimal.
- Byte-Size CounterCount UTF-8 bytes in text and compare the total with its character count.
- UnicodeInspect Unicode code points when a character spans multiple UTF-8 bytes.
- Bitwise CalculatorCombine or compare byte values with bitwise AND, OR, XOR, and shifts.