This tool converts text to its binary representation in your browser; nothing leaves your machine. For the inverse direction, see binary to text.
How the conversion works
Input: Hi
Step 1: encode as UTF-8 bytes
H = 0x48 = 72
i = 0x69 = 105
Step 2: each byte as 8 binary digits
72 = 01001000
105 = 01101001
Output: 01001000 01101001
Each ASCII character becomes one byte (8 bits). Non-ASCII characters take 2-4 bytes in UTF-8 and produce 16-32 binary digits each.
What the output looks like
"Hello"
→ 01001000 01100101 01101100 01101100 01101111
"café"
→ 01100011 01100001 01100110 11000011 10101001
c a f é (2 bytes: 0xC3, 0xA9 in UTF-8)
Common layouts:
- Space-separated bytes —
01001000 01100101— readable. This is what the tool above outputs. - No separators —
0100100001100101— compact. - Comma-separated —
01001000,01100101— for embedding in code.
The binary to text tool reads both the spaced and the continuous form back.
Multi-byte UTF-8
Non-ASCII characters span multiple bytes. The bit patterns identify byte roles:
| Byte 1 starts with | Bytes total | Code point range |
|---|---|---|
0 | 1 (ASCII) | U+0000 – U+007F |
110 | 2 | U+0080 – U+07FF |
1110 | 3 | U+0800 – U+FFFF |
11110 | 4 | U+10000 – U+10FFFF |
10 | continuation | (always preceded by a start byte) |
Example: é (U+00E9, in the 2-byte range):
UTF-8 bytes: 0xC3 0xA9
Binary: 11000011 10101001
↑↑ ↑↑
| +-- continuation byte (starts with 10)
+-- 2-byte start (starts with 110)
The bit prefixes make UTF-8 self-synchronizing — given any byte stream, you can find character boundaries.
When you’d actually use this
Honestly: rarely. Text-to-binary is 8× more verbose than the bytes themselves and 16× more verbose than text. Use cases:
- Education. Demonstrating how characters become bytes.
- Embedded / hardware contexts. When the target system displays bits directly.
- Steganography. Hiding messages in low bits of images, where the binary encoding is the natural intermediate.
- CTF puzzles. Decoding contests sometimes use binary as the encoding layer.
For practical byte-level work, hex to text and text to hex are the right tools — same information, half as many digits.
Encoding choice
The tool above defaults to UTF-8 because it’s the modern standard and a strict superset of ASCII. Other encodings would produce different bytes:
- UTF-8 — variable-length, ASCII-compatible. Modern default.
- UTF-16 — 2 or 4 bytes per character. Some Windows internals.
- Latin-1 / ISO-8859-1 — 1 byte per character; only first 256 Unicode code points; corrupts higher Unicode.
- ASCII — 1 byte per character; rejects anything above U+007F.
For non-ASCII text, the encoding matters. The tool above always uses UTF-8.
Bit ordering
Within a byte, the standard convention is most-significant bit first (MSB). 01001000 reads as 0×128 + 1×64 + 0×32 + 0×16 + 1×8 + 0×4 + 0×2 + 0×1 = 72 = H.
Some niche systems (certain serial protocols, some bitwise manipulations) use LSB-first. The tool above uses MSB-first — the universal convention for text representation.
Length doubles every layer
"Hello" (5 chars in text)
(5 bytes in UTF-8)
(10 hex digits)
(40 binary digits)
(40 chars + 4 separator chars in space-separated binary)
Each representation has a known size relationship. Binary is the most verbose; useful only when verbosity is the point.
Common pitfalls
- Mixing endianness. If a downstream consumer expects LSB-first, MSB-first output is read wrong. Verify the convention.
- Mismatched encoding. If your input contains characters outside your declared encoding’s range, they’re lost or replaced. UTF-8 covers all of Unicode; smaller encodings don’t.
- Whitespace separators. Some downstream parsers require specific separator characters (commas only, or tabs). Pick the format the consumer expects.
- Concatenation without separators.
0100100001100101is two characters (H,e) but a parser without byte-boundary knowledge can’t tell. Always include byte separators for transit. - Confusing bits and bytes. “8-bit number” is one byte; “8 binary digits” is also one byte. “16-bit” is two bytes. Sloppy use causes off-by-eight errors.
For the inverse direction, see binary to text. For the more practical hex form, text to hex. For ASCII reference, ASCII table.