How to use the Text to Binary Converter
- Choose Text → Binary to encode, or Binary → Text to decode.
- Type or paste your text or code. Results update as you type.
- When encoding, choose how bytes are separated, and copy the binary, hex, octal or decimal version you need.
- When decoding, pick the input format. Any invalid group is pointed out so you can fix it.
Features
- Binary, hexadecimal, octal and decimal output at once
- Full UTF-8 support, including accents, other alphabets and emoji
- Space, comma, new line or no separator between bytes
- Decodes binary, hex, octal or decimal back into text
- Accepts long unbroken runs as well as spaced groups
- Clear messages for invalid digits or broken UTF-8
How text becomes binary
Computers store text as numbers. Every character has a number in Unicode, called its code point, and an encoding turns that number into bytes. This tool uses UTF-8, the encoding used by almost every web page. Each byte is eight bits, which is why binary output comes in groups of eight digits.
| Character | Decimal | Binary | Hex | Octal |
|---|---|---|---|---|
| H | 72 | 01001000 | 48 | 110 |
| i | 105 | 01101001 | 69 | 151 |
| ! | 33 | 00100001 | 21 | 041 |
For English letters, digits and common punctuation, UTF-8 uses one byte that matches the older ASCII standard, so this converter gives the same result as an ASCII table. Other characters take more bytes: é is two bytes (C3 A9), the euro sign € is three (E2 82 AC), and the emoji 😀 is four (F0 9F 98 80). That is why the byte count can be larger than the character count.
Reading a byte by hand
Each of the eight positions in a byte has a value, from left to right: 128, 64, 32, 16, 8, 4, 2 and 1. Add up the values where there is a 1. For 01001000 that is 64 + 8 = 72, which is the code for H. With a little practice you can decode short messages without any tool.
Choosing a format
- Binary shows every bit and is the classic “computer code” look, popular for puzzles, gifts and teaching.
- Hexadecimal writes each byte as two digits from 0–9 and A–F. Programmers use it because it is compact and maps neatly onto bits: each hex digit is exactly four bits.
- Octal uses digits 0–7, three per byte. You still meet it in some programming escape sequences.
- Decimal shows each byte as a number from 0 to 255.
Tick Keep each character’s bytes together to see where each multi-byte character starts and ends, which helps when learning how UTF-8 works.
Decoding tips
Paste binary with spaces between bytes, or as one long run whose length is a multiple of eight. Groups shorter than eight bits, such as seven-bit ASCII, are padded automatically. Hex can be spaced pairs or one continuous string, with or without 0x prefixes. If the bytes are not valid UTF-8, for example because a byte is missing from a multi-byte character, the tool still shows what it can and marks the broken parts with �.
To convert a number rather than text, such as 255 to 11111111, use the Number Base Converter. For encodings used to move data safely, see the Base64 Encoder and Decoder.
Frequently asked questions
Is this ASCII or Unicode?
It uses UTF-8, the standard Unicode encoding. For English letters, digits and basic punctuation, UTF-8 bytes are identical to ASCII, so the results match an ASCII table.
Why does one emoji turn into 32 bits?
Emoji are outside the range that fits in one byte, so UTF-8 stores them in four bytes. Accented letters usually take two bytes and many symbols take three.
Can I decode binary with no spaces?
Yes, as long as the total number of digits is a multiple of eight. The tool splits it into bytes automatically.
What does “not valid UTF-8” mean?
The bytes do not form complete characters, often because a byte was lost or mistyped. The readable parts are still shown, and broken parts appear as �.
How do I convert a number like 42 to binary?
This tool converts characters, so “42” becomes the codes for the digits 4 and 2. Use the Number Base Converter to convert the value 42 itself.