How to Convert Text to Binary
Enter text to encode its UTF-8 bytes as groups of eight binary digits. Copy the groups as a byte representation. Use the binary translator to reverse the process with the same encoding.
How Text Encoding Works
A character is not always one byte. ASCII letters occupy one UTF-8 byte, while accented characters and emoji can occupy several. The output represents bytes, not a visual character count.
Text to Binary Examples
The letter A becomes 01000001. The word Hi becomes 01001000 01101001. A multi-byte character produces several groups, which must remain together and in order when decoding.
Unicode, Spacing, and Input Rules
Spaces between binary groups separate bytes; a space in the source text becomes its own byte. Keep all eight bits of each byte. Invalid UTF-8 sequences cannot be decoded into the original intended text.
More examples and technical details
How to Convert Text to Binary
Text to binary conversion works one character at a time. Every character you type has a numeric code assigned to it by a character encoding standard, and binary is simply that number written in base 2. The converter above does this instantly, but the manual process is short enough to follow by hand.
- Take the first character of your text.
- Look up its character code. For English letters, digits, and punctuation this is the ASCII value, for example the letter H is 72.
- Convert that number to binary using repeated division by 2, or read it off an ASCII table.
- Pad the result to eight digits with leading zeros so every character is a full byte.
- Repeat for every character and separate the bytes with spaces so the result stays readable.
Worked example: encoding "Hi"
"Hi" = 01001000 01101001
Why Eight Bits Per Character
A byte is eight bits, and eight bits can represent 256 different values (2 to the power of 8). That range was chosen because it comfortably covers the 128 ASCII characters with room to spare, and because early hardware was built around 8 bit words.
This is why the converter pads every character to eight digits. The letter A is 65, which is 1000001 in binary using only seven digits, but it is written as 01000001 so that each character occupies exactly one byte. Without that padding, a decoder would have no reliable way to know where one character ends and the next begins.
ASCII, Unicode, and UTF-8
ASCII is the original character encoding standard, finalised in 1963. It defines 128 characters: the English alphabet in both cases, the digits 0 to 9, common punctuation, and 33 non printing control codes such as tab, newline, and carriage return. Because 128 values fit in seven bits, every ASCII character fits comfortably inside a single byte.
ASCII covers English and almost nothing else, which is why Unicode exists. Unicode assigns a number, called a code point, to every character in every writing system, plus symbols and emoji. UTF-8 is the encoding that turns those code points into bytes, and it was designed so that the first 128 code points encode to exactly the same single bytes as ASCII. That backward compatibility is why plain English text looks identical in both.
The practical consequence for this tool: English letters, digits, and punctuation each produce one byte. Accented characters, Greek, Cyrillic, Arabic, and CJK characters produce two or three bytes each, and emoji usually produce four. The converter handles all of them correctly using UTF-8.
Things That Trip People Up
- Uppercase and lowercase are different characters with different codes. A is 65 and a is 97, a gap of exactly 32.
- The space character is not nothing. It is character 32, which is 00100000 in binary.
- Accented letters, emoji, and non Latin scripts need more than one byte each, because they live outside the original 128 character ASCII range.
ASCII Conversion Table
Every printable ASCII character with its decimal code, binary byte, and hexadecimal byte. Codes 0 to 31 are control characters and are not printable, so they are not listed here.
| Char | Dec | Binary | Hex |
|---|---|---|---|
| space | 32 | 00100000 | 20 |
| ! | 33 | 00100001 | 21 |
| " | 34 | 00100010 | 22 |
| # | 35 | 00100011 | 23 |
| $ | 36 | 00100100 | 24 |
| % | 37 | 00100101 | 25 |
| & | 38 | 00100110 | 26 |
| ' | 39 | 00100111 | 27 |
| ( | 40 | 00101000 | 28 |
| ) | 41 | 00101001 | 29 |
| * | 42 | 00101010 | 2A |
| + | 43 | 00101011 | 2B |
| , | 44 | 00101100 | 2C |
| - | 45 | 00101101 | 2D |
| . | 46 | 00101110 | 2E |
| / | 47 | 00101111 | 2F |
| 0 | 48 | 00110000 | 30 |
| 1 | 49 | 00110001 | 31 |
| 2 | 50 | 00110010 | 32 |
| 3 | 51 | 00110011 | 33 |
| 4 | 52 | 00110100 | 34 |
| 5 | 53 | 00110101 | 35 |
| 6 | 54 | 00110110 | 36 |
| 7 | 55 | 00110111 | 37 |
| Char | Dec | Binary | Hex |
|---|---|---|---|
| 8 | 56 | 00111000 | 38 |
| 9 | 57 | 00111001 | 39 |
| : | 58 | 00111010 | 3A |
| ; | 59 | 00111011 | 3B |
| < | 60 | 00111100 | 3C |
| = | 61 | 00111101 | 3D |
| > | 62 | 00111110 | 3E |
| ? | 63 | 00111111 | 3F |
| @ | 64 | 01000000 | 40 |
| A | 65 | 01000001 | 41 |
| B | 66 | 01000010 | 42 |
| C | 67 | 01000011 | 43 |
| D | 68 | 01000100 | 44 |
| E | 69 | 01000101 | 45 |
| F | 70 | 01000110 | 46 |
| G | 71 | 01000111 | 47 |
| H | 72 | 01001000 | 48 |
| I | 73 | 01001001 | 49 |
| J | 74 | 01001010 | 4A |
| K | 75 | 01001011 | 4B |
| L | 76 | 01001100 | 4C |
| M | 77 | 01001101 | 4D |
| N | 78 | 01001110 | 4E |
| O | 79 | 01001111 | 4F |
| Char | Dec | Binary | Hex |
|---|---|---|---|
| P | 80 | 01010000 | 50 |
| Q | 81 | 01010001 | 51 |
| R | 82 | 01010010 | 52 |
| S | 83 | 01010011 | 53 |
| T | 84 | 01010100 | 54 |
| U | 85 | 01010101 | 55 |
| V | 86 | 01010110 | 56 |
| W | 87 | 01010111 | 57 |
| X | 88 | 01011000 | 58 |
| Y | 89 | 01011001 | 59 |
| Z | 90 | 01011010 | 5A |
| [ | 91 | 01011011 | 5B |
| \ | 92 | 01011100 | 5C |
| ] | 93 | 01011101 | 5D |
| ^ | 94 | 01011110 | 5E |
| _ | 95 | 01011111 | 5F |
| ` | 96 | 01100000 | 60 |
| a | 97 | 01100001 | 61 |
| b | 98 | 01100010 | 62 |
| c | 99 | 01100011 | 63 |
| d | 100 | 01100100 | 64 |
| e | 101 | 01100101 | 65 |
| f | 102 | 01100110 | 66 |
| g | 103 | 01100111 | 67 |
| Char | Dec | Binary | Hex |
|---|---|---|---|
| h | 104 | 01101000 | 68 |
| i | 105 | 01101001 | 69 |
| j | 106 | 01101010 | 6A |
| k | 107 | 01101011 | 6B |
| l | 108 | 01101100 | 6C |
| m | 109 | 01101101 | 6D |
| n | 110 | 01101110 | 6E |
| o | 111 | 01101111 | 6F |
| p | 112 | 01110000 | 70 |
| q | 113 | 01110001 | 71 |
| r | 114 | 01110010 | 72 |
| s | 115 | 01110011 | 73 |
| t | 116 | 01110100 | 74 |
| u | 117 | 01110101 | 75 |
| v | 118 | 01110110 | 76 |
| w | 119 | 01110111 | 77 |
| x | 120 | 01111000 | 78 |
| y | 121 | 01111001 | 79 |
| z | 122 | 01111010 | 7A |
| { | 123 | 01111011 | 7B |
| | | 124 | 01111100 | 7C |
| } | 125 | 01111101 | 7D |
| ~ | 126 | 01111110 | 7E |
Looking for a different conversion? Browse every developer tool including binary, hex, octal, and Base64 converters.
Frequently asked questions
How do I convert text to binary?
Enter text and copy the eight-bit UTF-8 byte groups.
Does the tool support Unicode and special characters?
Yes. TextEncoder converts Unicode text into UTF-8 bytes, including multi-byte characters.
What input format should I use?
Enter ordinary text. The output separates eight-bit bytes with spaces.
Is any input uploaded to a server?
No. Input is processed in this browser tab and is not uploaded by the tool. Copy and download are actions you control; ordinary page analytics do not receive tool input.