About the Text to Binary Converter
This text to binary converter turns any text into the bytes a computer actually stores — shown as 8-bit binary, hexadecimal, decimal or octal — and works in reverse to translate binary or hex codes back into readable text. A per-character table shows each letter’s Unicode code point alongside its byte values.
It is handy for students learning how character encoding works, developers debugging byte streams or escape sequences, puzzle and CTF players decoding hidden messages, and anyone who wants to write a name in binary. Decoding accepts bytes separated by spaces, commas or new lines, and also a continuous run of 0s and 1s, which is split into 8-bit groups.
Text is encoded as UTF-8, the standard encoding of the web. Plain English letters, digits and punctuation use one byte each and match classic ASCII codes; accented letters, symbols like € and emoji use two to four bytes.
How to use the text to binary converter
- 1Choose Text → codes to encode, or Codes → text to decode.
- 2Pick the format: binary, hex, decimal or octal.
- 3Type or paste your text or codes into the input box.
- 4Copy the result, and check the table to see each character’s bytes.
Formula and method
Each character is first converted to its Unicode code point and then encoded as UTF-8. Code points 0–127 (ASCII) become a single byte, so "H" (72) is 01001000. Higher code points are split across 2, 3 or 4 bytes with fixed prefix bits; the euro sign € (U+20AC) becomes E2 82 AC.
Every byte is then written in the chosen base: binary padded to 8 digits, hexadecimal to 2, octal to 3, and decimal without padding. Decoding reverses the process — each token is parsed in the chosen base, checked to be between 0 and 255, and the byte sequence is decoded as UTF-8.
Worked examples
"Hello!" in binary
Each ASCII character is one byte: H = 72 = 01001000, e = 101 = 01100101, l = 108 = 01101100, o = 111 = 01101111 and ! = 33 = 00100001 — 6 bytes or 48 bits.
Price with a euro sign in hex
"5" is 0x35 and the space is 0x20, but € (U+20AC) needs three UTF-8 bytes, E2 82 AC — so three characters take five bytes.
Decode unspaced binary
The 16-bit string is split into 01001000 (72, "H") and 01101001 (105, "i"), giving the text "Hi".
Decode ASCII decimal codes
The decimal byte values 67, 111, 100 and 101 are the ASCII codes for C, o, d and e.
Frequently asked questions
How do you convert text to binary?+
Look up each character’s code (for example in ASCII "A" is 65), then write that number in base 2 using 8 digits: 65 = 01000001. This tool does it for every character using UTF-8, so it also handles accents, symbols and emoji.
Why are some characters more than 8 bits?+
UTF-8 uses one byte only for the 128 ASCII characters. Other characters need 2 to 4 bytes — é is 2 bytes, € is 3 bytes and most emoji are 4 bytes — so their binary form has 16, 24 or 32 bits.
What is the difference between ASCII and UTF-8?+
ASCII is a 7-bit code covering 128 English letters, digits and control characters. UTF-8 is a superset that encodes every Unicode character; for the first 128 code points its bytes are identical to ASCII.
Can I decode binary without spaces?+
Yes. If you paste one continuous string of 0s and 1s whose length is a multiple of 8, it is split into 8-bit bytes automatically. The same applies to continuous hex, which is split into pairs, and continuous octal, which is split into groups of three digits.
What does "Hello" look like in hexadecimal?+
"Hello" in hex is 48 65 6C 6C 6F. Hex is a compact way to write bytes: each byte becomes exactly two hex digits, which is why it is common in programming and network tools.