How to use the binary to text converter
- Next to Convert, leave Text selected for words and sentences. Decimal numbers and Hex numbers are for converting whole numbers.
- Under Direction, choose Binary to text to decode, or Text to binary to encode. The swap button flips the direction and moves the result into the input box.
- Paste or type in the left box. The result updates as you type. Binary can be spaced in 8-bit groups, one group per line, or one unbroken string, and a 0b prefix is accepted.
- Press Copy above the right box to copy the result. The checkboxes under the boxes change spacing and grouping.
How the conversion works
Text is encoded as UTF-8 (RFC 3629), the same encoding web pages use. English letters, digits and punctuation take one byte, most accented letters two, most other alphabets three, and emoji four. Each byte is written as eight binary digits worth 128, 64, 32, 16, 8, 4, 2 and 1 from left to right. Decoding reads the bits in groups of eight and decodes the resulting bytes as UTF-8.
In Decimal and Hex modes the tool converts numbers, not text. Each hex digit stands for exactly four bits, so leading zeros in hex are kept and the binary side always lines up digit for digit.
Worked example
The page opens in Binary to text with 01001000 01100101 01101100 01101100 01101111 in the left box. The first group is 64 + 8 = 72, which is H. Then 64 + 32 + 4 + 1 = 101 is e, 64 + 32 + 8 + 4 = 108 is l (twice), and 64 + 32 + 8 + 4 + 2 + 1 = 111 is o. The right box shows Hello and the status line reads "Decoded 5 bytes (40 bits) as UTF-8 text."
Limits and edge cases
- Unbroken binary must be a multiple of 8 bits long. Spaced groups may be shorter than 8 bits (7-bit ASCII works) and are read as numbers, with a note.
- Bytes that are not valid UTF-8, such as data from an image, cannot be shown as text. The tool says so instead of printing garbage.
- Decimal and Hex modes handle whole numbers up to 4,096 digits. Negative decimals keep a minus sign (this is not two's complement), and fractions are not supported.
- Separate several numbers with spaces or line breaks. Decimal numbers may use thousands commas, such as 1,000.
- For octal, base 36 or any other base, use the number base converter. To look up character codes, use the ASCII table. To turn bytes into a text-safe string, try the Base64 encoder and decoder.
Frequently asked questions
How do I convert binary to text?
Split the binary into groups of 8 bits, turn each group into a decimal number, and read that number as a character code. For example, 01001000 is 72, which is the letter H. This tool does that for a whole message at once.
How do I convert text to binary?
Write each character as its UTF-8 byte, then write each byte as 8 binary digits. The word Hi becomes 01001000 01101001. Choose Text to binary and type your text.
Why do accented letters and emoji give more than 8 bits?
UTF-8 uses one byte for English letters, two for most accented letters, three for most other scripts and four for emoji. So é is 11000011 10101001, and a smiling face emoji takes 32 bits.
How many bits are in a byte?
A byte is 8 bits, which gives 256 possible values from 0 to 255. Two hex digits describe one byte because each hex digit stands for 4 bits.
Why do computers use binary?
Transistors have two reliable states, on and off, so binary matches the hardware. Telling apart more voltage levels would make circuits slower, more error prone and harder to build.
Sources: IETF RFC 3629, UTF-8, a transformation format of ISO 10646.