Binary Encoder & Decoder
Convert text to 8-bit binary bytes, or decode binary back to text.
Text to binary: the quick answer
A binary encoder turns text into bytes and displays each byte as eight zeros and ones. With UTF-8 selected, Hi! becomes 01001000 01101001 00100001. Choose Binary → Text to reverse it with the same encoding.
Use UTF-8 for general text, ASCII for the 0–127 character range, or UTF-16BE when the source expects big-endian UTF-16. Binary encoding changes representation; it does not encrypt a message or require a secret key.
How text becomes binary
- Code point: Unicode assigns a number to a character. The letter H is U+0048.
- Bytes: the encoding maps that code point to bytes. H is one byte, decimal 72, in UTF-8 and ASCII. In UTF-16BE it is two bytes: 0, then 72.
- Bits: write each byte in base 2 and pad it to eight digits. Decimal 72 becomes
01001000.
| Text | Code point | Byte (dec.) | 8 bits |
|---|---|---|---|
| H | U+0048 | 72 | 01001000 |
| i | U+0069 | 105 | 01101001 |
| ! | U+0021 | 33 | 00100001 |
In the first byte, 01001000 selects 64 and 8 from the place values 128, 64, 32, 16, 8, 4, 2, 1. Their sum is 72. The leading zero preserves the byte’s width.
For non-ASCII text, convert the encoded bytes, not just the code point number. For example, é is U+00E9 but its UTF-8 bytes are 11000011 10101001. RFC 3629, section 3 defines UTF-8’s one-to-four-byte sequences.
How many bits does the same text take?
Each cell shows bytes / bits for the exact text in the first column. ASCII cells marked “Cannot encode” contain characters outside its 7-bit repertoire.
| Text | ASCII | UTF-8 | UTF-16(BE) |
|---|---|---|---|
| HelloEnglish | 540 | 540 | 1080 |
| caféAccented | Cannot encode | 540 | 864 |
| ΕλλάδαGreek | Cannot encode | 1296 | 1296 |
| 中文Chinese | Cannot encode | 648 | 432 |
| 😀Emoji | Cannot encode | 432 | 432 |
| 👍🏽Skin tone | Cannot encode | 864 | 864 |
| 👨👩👧👦ZWJ family | Cannot encode | 25200 | 22176 |
Method: encode each string exactly as shown, with no normalization, terminator or BOM; multiply its byte count by eight. ASCII counts use one zero-padded byte per character. UTF-16 uses big-endian byte order; little-endian would have the same size. The accented word uses precomposed é (U+00E9). Separators in the displayed binary are not counted. Download the sizes, code points and worked example as JSON.
Why emoji take 32+ bits in UTF-8
The table’s 😀 is one code point, U+1F600. Its UTF-8 representation takes 4 bytes, or 32 bits. The skin-tone emoji 👍🏽 combines a thumbs-up and a modifier: 2 code points, 8 bytes and 64 bits.
The family 👨👩👧👦 combines four emoji and three U+200D zero-width joiners. Those 7 code points occupy 25 UTF-8 bytes (200 bits), even when rendered as one visible symbol. Its UTF-16 size is 22 bytes (176 bits). A visible symbol, a code point and a byte count measure different things.
UTF-16 represents supplementary code points with two 16-bit code units, called a surrogate pair. See the Unicode encoding FAQ for code units and byte order. Not every emoji needs four UTF-8 bytes on its own; the exact code points and modifiers determine the total.
7-bit ASCII vs 8-bit bytes
ASCII has 128 values, so seven bits suffice: H is 1001000. This tool shows and accepts whole 8-bit bytes, so H appears as 01001000. The extra leading zero does not add characters to ASCII. “Extended ASCII” covers different encodings and is not a single standard mapping.
ASCII mode flags café, Greek, Chinese and emoji because it cannot represent them. Choose UTF-8 or UTF-16BE for those strings. For a character reference, use the ASCII converter or decimal ASCII converter.
Decode binary without guessing
Select Binary → Text and match the encoding used to create the bytes. Paste 01001000 01101001 00100001 for Hi!, or remove the spaces. You can also put one byte on each line.
Each separated group must contain a multiple of eight bits. A seven-bit group, a comma, a 0b prefix or an invalid UTF sequence produces an error. UTF-16BE additionally needs an even number of bytes and valid surrogate pairs. No BOM is added on encoding; an explicitly supplied U+FEFF is preserved on decoding, and byte order is not auto-detected.
Download saves the displayed binary digits or decoded text as a UTF-8 text file. To read the digits as another numeric notation, use the converter below.
Frequently asked questions
What is binary code?
Binary code represents data using 0 and 1. A bit is one binary digit, and a byte contains eight bits. Text encoding determines which bytes represent each character; a character can require more than one byte.
How do I convert text to binary manually?
For an ASCII character, find its decimal code and convert that number to base 2, then add leading zeros to make eight bits. For example, A is 65, or 01000001. For other Unicode characters, first encode the code point into UTF-8 or UTF-16 bytes, then convert each byte to eight bits.
What is ASCII?
ASCII is a 7-bit character set with 128 values, from 0 to 127, covering English letters, digits, punctuation and control codes. This tool stores each ASCII value in an 8-bit byte with a leading zero. The term extended ASCII refers to several different 8-bit encodings, not one universal character set.
Why is binary important in computing?
Digital circuits can distinguish two states, represented as 0 and 1. Sequences of those bits represent numbers, text, images, audio and program instructions, making binary the basis of digital storage and processing.
What's the difference between binary and hex?
Binary is base 2, using 0 and 1. Hexadecimal is base 16, using 0–9 and A–F. One hexadecimal digit represents four bits, so the byte 11111111 is FF in hex. Changing notation preserves the byte value.
How do I convert text to binary?
Choose Text → Binary, leave UTF-8 selected for general text, and type or paste your message. The result shows zero-padded 8-bit bytes. To decode, choose Binary → Text, select the same encoding and paste complete binary bytes. Spaces, tabs and line breaks can separate bytes.
What is 72 in binary (8-bit)?
72 in 8-bit binary is 01001000 because 72 = 64 + 8. In ASCII and UTF-8, that byte represents H. The text 72 is different: the digit characters 7 and 2 encode as 00110111 00110010. Use Number to binary to convert the integer itself.
Why does an emoji have so many bits?
A single emoji such as 😀 uses four UTF-8 bytes, or 32 bits. An emoji with a skin tone such as 👍🏽 contains two code points and uses eight bytes, or 64 bits. The family 👨👩👧👦 contains four emoji joined by three zero-width joiners and uses 25 bytes, or 200 bits. One visible symbol can contain several code points.