About this tool
This binary translator converts in four directions: text to binary, binary to text, text to hex and hex to text. It works on bytes, not on letters. Your text is first encoded as UTF-8, the encoding used by almost every web page, and each byte is then written as 8 binary digits or 2 hex digits. Decoding reverses the process: the digits are turned back into bytes and the bytes are read as UTF-8.
How to use the binary translator
- Pick a direction: Text → Binary, Text → Hex, Binary → Text or Hex → Text.
- Type or paste your input. The result updates as you type, with a count of characters and bytes underneath.
- Copy the result with the button. If decoding finds a problem, a note under the result says what went wrong.
How text becomes bytes: ASCII and UTF-8
Computers store text as numbers. ASCII defines 128 codes, 0 to 127, for English letters, digits, punctuation and control characters. It is a 7-bit code, normally stored in an 8-bit byte whose top bit is 0, which is why H (72) appears as 01001000. ASCII has no room for é, € or emoji, so the tool uses UTF-8 (RFC 3629), which keeps the ASCII codes unchanged and stores every other Unicode character in 2 to 4 bytes:
- U+0000 to U+007F (the ASCII range): 1 byte.
- U+0080 to U+07FF (most accented Latin letters, Greek, Cyrillic, Hebrew, Arabic): 2 bytes.
- U+0800 to U+FFFF (most Chinese, Japanese and Korean characters, the euro sign): 3 bytes.
- U+10000 to U+10FFFF (most emoji and rare scripts): 4 bytes.
The first byte announces the length. A byte starting with 0 stands alone, 110 starts a 2-byte sequence, 1110 a 3-byte one and 11110 a 4-byte one, and every continuation byte starts with 10. These byte values were checked with Python's UTF-8 encoder and match what the tool produces:
| Character | Name | Code point | UTF-8 bytes (hex) | Bytes |
|---|---|---|---|---|
| A | Capital A | U+0041 | 41 | 1 |
| é | e with acute accent | U+00E9 | C3 A9 | 2 |
| ñ | n with tilde | U+00F1 | C3 B1 | 2 |
| € | Euro sign | U+20AC | E2 82 AC | 3 |
| 😀 | Grinning face emoji | U+1F600 | F0 9F 98 80 | 4 |
| 👍🏽 | Thumbs up, medium skin tone | U+1F44D + U+1F3FD | F0 9F 91 8D F0 9F 8F BD | 8 |
The thumbs-up with a skin tone is two code points, the emoji and a skin-tone modifier, so it takes 8 bytes even though it looks like one symbol.
How the decoder reads binary
Spaces, line breaks and commas all separate bytes. Each group of 1 to 8 digits is read as one byte, so 7-bit ASCII written as 1001000 1101001 decodes to Hi just as 01001000 01101001 does. An optional 0b prefix on a group is ignored.
Binary without spaces is split by length. A run whose length is a multiple of 8 is cut into 8-bit bytes, so 0100100001101001 becomes Hi. Otherwise, a run whose length is a multiple of 7 is cut into 7-bit ASCII codes, so 10010001101001 is also Hi. A run that fits neither rule is rejected instead of guessed. A run of 56, 112 or any other multiple of both 7 and 8 is always read as 8-bit bytes.
How hex fits in
One hex digit stands for exactly four binary digits, so a byte is always two hex digits: 4 is 0100 and 8 is 1000, giving 48 = 01001000 = 4 × 16 + 8 = 72. Hex to text accepts spaced pairs (48 69), 0x prefixes (0x48 0x69) or one unbroken run (4869), and a run with an odd number of digits is rejected. To convert a number such as 255 rather than text, use the Hex to Decimal Converter or the Binary to Decimal Converter, and the guide to converting binary to decimal by hand explains place values step by step.
Worked example
The translator opens with Hello in Text → Binary mode. Each letter is in the ASCII range, so each becomes one byte: H is 72, e is 101, l is 108 and o is 111. The tool shows:
01001000 01100101 01101100 01101100 01101111 5 characters (code points), 5 bytes in UTF-8.
Switch to Text → Hex and the same five bytes read 48 65 6C 6C 6F. Now type café instead: the é needs two bytes, so the output is 01100011 01100001 01100110 11000011 10101001, which is 4 characters but 5 bytes.
Binary alphabet chart (A to Z)
Uppercase and lowercase English letters in UTF-8, which matches ASCII for these characters. Lowercase is always 32 (hex 20) higher, so the two forms differ only in the third bit from the left. A space is 00100000 (hex 20).
| Letter | Hex (upper) | Binary (upper) | Hex (lower) | Binary (lower) |
|---|---|---|---|---|
| A | 41 | 01000001 | 61 | 01100001 |
| B | 42 | 01000010 | 62 | 01100010 |
| C | 43 | 01000011 | 63 | 01100011 |
| D | 44 | 01000100 | 64 | 01100100 |
| E | 45 | 01000101 | 65 | 01100101 |
| F | 46 | 01000110 | 66 | 01100110 |
| G | 47 | 01000111 | 67 | 01100111 |
| H | 48 | 01001000 | 68 | 01101000 |
| I | 49 | 01001001 | 69 | 01101001 |
| J | 4A | 01001010 | 6A | 01101010 |
| K | 4B | 01001011 | 6B | 01101011 |
| L | 4C | 01001100 | 6C | 01101100 |
| M | 4D | 01001101 | 6D | 01101101 |
| N | 4E | 01001110 | 6E | 01101110 |
| O | 4F | 01001111 | 6F | 01101111 |
| P | 50 | 01010000 | 70 | 01110000 |
| Q | 51 | 01010001 | 71 | 01110001 |
| R | 52 | 01010010 | 72 | 01110010 |
| S | 53 | 01010011 | 73 | 01110011 |
| T | 54 | 01010100 | 74 | 01110100 |
| U | 55 | 01010101 | 75 | 01110101 |
| V | 56 | 01010110 | 76 | 01110110 |
| W | 57 | 01010111 | 77 | 01110111 |
| X | 58 | 01011000 | 78 | 01111000 |
| Y | 59 | 01011001 | 79 | 01111001 |
| Z | 5A | 01011010 | 7A | 01111010 |
Edge cases and common mistakes
- Dropping a leading zero. In spaced input,
1001000still means H. In an unbroken run, one missing digit shifts every byte after it, and the run is usually rejected. - Invalid UTF-8. Bytes that do not form valid UTF-8, such as a lone
C3, are shown as the replacement character �, which the browser's TextDecoder substitutes for malformed data, and the tool warns you. - Text from another encoding. Windows-1252 and Latin-1 store é as the single byte
E9, which is not valid UTF-8 on its own. - Look-alike characters. An é typed as e plus a combining accent is
65 CC 81(3 bytes), notC3 A9, though both look the same. - Numbers versus text. Translating the text
42gives the bytes for the characters 4 and 2 (00110100 00110010), not the number 42 in binary (101010). - Base64 is not hex. For strings like
SGk=, use the Base64 Encoder and Decoder.
Frequently asked questions
Text is encoded as UTF-8 bytes, and each byte is shown as 8 binary digits. Basic ASCII characters (English letters, digits, and common punctuation) take one byte, so they convert to exactly 8 binary digits; accented letters, other scripts, and emoji take 2 to 4 bytes, so they convert to 16 to 32 binary digits.
Both represent the same underlying byte values for your text — binary shows each byte as 8 digits of 0s and 1s, while hex shows the same byte as 2 hexadecimal digits (0-9, A-F), which is more compact and easier to read.
Yes. A run of digits with no spaces is split into 8-bit bytes when its length is a multiple of 8, or into 7-bit ASCII codes when its length is a multiple of 7 but not 8. For example, 0100100001101001 decodes to Hi. A run whose length fits neither rule is rejected, because there is no safe place to split it.
Choose Hex → Text and paste the hex. Byte pairs can be separated by spaces, written with 0x prefixes or run together, so 48 65 6C 6C 6F, 0x48 0x65 0x6C 0x6C 0x6F and 48656C6C6F all decode to Hello. The bytes are read as UTF-8, so C3 A9 becomes é.
Hello in binary is 01001000 01100101 01101100 01101100 01101111. Each group is one byte for one letter: H is 72, e is 101, l is 108 and o is 111 in decimal. In hex the same word is 48 65 6C 6C 6F, which is shorter to write but represents exactly the same five bytes.
That symbol is the Unicode replacement character. The browser inserts it when the bytes do not form valid UTF-8, for example when a multi-byte character is missing one of its bytes or the data came from a different encoding such as Windows-1252. Check that no group was dropped or mistyped, then decode again.
Most emoji have code points above U+FFFF, and UTF-8 stores those in 4 bytes. That means 32 binary digits or 8 hex digits for a single emoji. The grinning face, U+1F600, becomes F0 9F 98 80 in hex, while a plain English letter needs only one byte.