Binary Translator
Convert text to binary (8-bit UTF-8 bytes) or decode binary back to text. You can also show the same bytes as hexadecimal, decimal or octal, and choose a space, comma or no separator. Everything runs in your browser.
Byte-by-byte breakdown
How text becomes binary
Computers store text as numbers. This translator uses UTF-8, the encoding used by almost all web pages: every character is turned into one to four bytes, and each byte is written as eight bits (binary digits). A bit is 0 or 1, and the eight positions are worth 128, 64, 32, 16, 8, 4, 2 and 1. Adding the positions that hold a 1 gives the byte value — 01000001 is 64 + 1 = 65, the letter A.
Decoding works in reverse: the binary is split into groups of eight, each group becomes a byte, and the bytes are read as UTF-8 text.
How to convert text to binary step by step
Here is the word Cat converted by hand.
- Find each character's code. In ASCII (and UTF-8, which matches ASCII for these characters) C is 67, a is 97 and t is 116. Upper and lower case have different codes.
- Write each number as a sum of powers of two. The eight bit positions are worth 128, 64, 32, 16, 8, 4, 2 and 1. 67 = 64 + 2 + 1. 97 = 64 + 32 + 1. 116 = 64 + 32 + 16 + 4.
- Put a 1 in each used position and 0 elsewhere. 67 becomes 01000011, 97 becomes 01100001 and 116 becomes 01110100. Always keep eight digits, adding leading zeros.
- Join the bytes. Cat =
01000011 01100001 01110100. The same bytes are43 61 74in hexadecimal,67 97 116in decimal and103 141 164in octal.
| Character | Decimal | Binary | Hex | Octal |
|---|---|---|---|---|
| C | 67 | 01000011 | 43 | 103 |
| a | 97 | 01100001 | 61 | 141 |
| t | 116 | 01110100 | 74 | 164 |
To decode binary to text, do the same in reverse: split the digits into groups of eight, add up the position values of each 1 to get a number, and look the number up in the table below.
Hex, decimal and octal output
Binary, hexadecimal, decimal and octal are just different ways of writing the same byte values. Hexadecimal (base 16) uses two digits per byte, 00 to FF, and is common in programming and network tools. Decimal shows each byte as a number from 0 to 255. Octal (base 8) uses three digits per byte, 000 to 377. Pick the format with the Output format menu, and the separator menu to put a space, a comma or nothing between bytes.
Examples to try
- A →
01000001(65). - Hi →
01001000 01101001. Paste that back and choose Binary → Text to get Hi again. - é →
11000011 10101001. Accented letters need two bytes in UTF-8. - A space character is
00100000(32), so "Hi there" contains one more byte than its letters.
Common mistakes
- Dropping leading zeros. A is
01000001, not1000001. Without the leading zero the total length is no longer a multiple of 8 and the bytes shift. - Mixing in other characters. Only 0, 1, spaces, line breaks and commas are accepted when decoding. Letters such as O or l typed instead of 0 or 1 cause an error.
- Assuming one byte per character. Emoji and many non-English letters take two to four bytes. Cutting the binary in the middle of such a character makes the bytes invalid UTF-8.
- Confusing case. Uppercase and lowercase letters differ by 32, which is a single bit: A is 01000001 and a is 01100001.
Binary table for common characters
| Character | Decimal | Binary |
|---|---|---|
| A | 65 | 01000001 |
| B | 66 | 01000010 |
| C | 67 | 01000011 |
| D | 68 | 01000100 |
| E | 69 | 01000101 |
| F | 70 | 01000110 |
| G | 71 | 01000111 |
| H | 72 | 01001000 |
| I | 73 | 01001001 |
| J | 74 | 01001010 |
| K | 75 | 01001011 |
| L | 76 | 01001100 |
| M | 77 | 01001101 |
| N | 78 | 01001110 |
| O | 79 | 01001111 |
| P | 80 | 01010000 |
| Q | 81 | 01010001 |
| R | 82 | 01010010 |
| S | 83 | 01010011 |
| T | 84 | 01010100 |
| U | 85 | 01010101 |
| V | 86 | 01010110 |
| W | 87 | 01010111 |
| X | 88 | 01011000 |
| Y | 89 | 01011001 |
| Z | 90 | 01011010 |
| a | 97 | 01100001 |
| b | 98 | 01100010 |
| c | 99 | 01100011 |
| d | 100 | 01100100 |
| e | 101 | 01100101 |
| f | 102 | 01100110 |
| g | 103 | 01100111 |
| h | 104 | 01101000 |
| i | 105 | 01101001 |
| j | 106 | 01101010 |
| k | 107 | 01101011 |
| l | 108 | 01101100 |
| m | 109 | 01101101 |
| n | 110 | 01101110 |
| o | 111 | 01101111 |
| p | 112 | 01110000 |
| q | 113 | 01110001 |
| r | 114 | 01110010 |
| s | 115 | 01110011 |
| t | 116 | 01110100 |
| u | 117 | 01110101 |
| v | 118 | 01110110 |
| w | 119 | 01110111 |
| x | 120 | 01111000 |
| y | 121 | 01111001 |
| z | 122 | 01111010 |
| 0 | 48 | 00110000 |
| 1 | 49 | 00110001 |
| 2 | 50 | 00110010 |
| 3 | 51 | 00110011 |
| 4 | 52 | 00110100 |
| 5 | 53 | 00110101 |
| 6 | 54 | 00110110 |
| 7 | 55 | 00110111 |
| 8 | 56 | 00111000 |
| 9 | 57 | 00111001 |
| (space) | 32 | 00100000 |
| ! | 33 | 00100001 |
| ? | 63 | 00111111 |
| . | 46 | 00101110 |
What is ASCII?
ASCII is the original 7-bit character code for English text: 128 codes for letters, digits, punctuation and control characters. Printable characters are codes 32 to 126. UTF-8, which this translator uses, encodes these characters with the same single byte, so for plain English text ASCII and UTF-8 binary are identical. Letters outside ASCII, such as é or emoji, take two to four bytes in UTF-8.
Printable ASCII table (32–126) in binary
| Character | Decimal | Binary |
|---|---|---|
| space | 32 | 00100000 |
| ! | 33 | 00100001 |
| " | 34 | 00100010 |
| # | 35 | 00100011 |
| $ | 36 | 00100100 |
| % | 37 | 00100101 |
| & | 38 | 00100110 |
| ' | 39 | 00100111 |
| ( | 40 | 00101000 |
| ) | 41 | 00101001 |
| * | 42 | 00101010 |
| + | 43 | 00101011 |
| , | 44 | 00101100 |
| - | 45 | 00101101 |
| . | 46 | 00101110 |
| / | 47 | 00101111 |
| 0 | 48 | 00110000 |
| 1 | 49 | 00110001 |
| 2 | 50 | 00110010 |
| 3 | 51 | 00110011 |
| 4 | 52 | 00110100 |
| 5 | 53 | 00110101 |
| 6 | 54 | 00110110 |
| 7 | 55 | 00110111 |
| 8 | 56 | 00111000 |
| 9 | 57 | 00111001 |
| : | 58 | 00111010 |
| ; | 59 | 00111011 |
| < | 60 | 00111100 |
| = | 61 | 00111101 |
| > | 62 | 00111110 |
| ? | 63 | 00111111 |
| @ | 64 | 01000000 |
| A | 65 | 01000001 |
| B | 66 | 01000010 |
| C | 67 | 01000011 |
| D | 68 | 01000100 |
| E | 69 | 01000101 |
| F | 70 | 01000110 |
| G | 71 | 01000111 |
| H | 72 | 01001000 |
| I | 73 | 01001001 |
| J | 74 | 01001010 |
| K | 75 | 01001011 |
| L | 76 | 01001100 |
| M | 77 | 01001101 |
| N | 78 | 01001110 |
| O | 79 | 01001111 |
| P | 80 | 01010000 |
| Q | 81 | 01010001 |
| R | 82 | 01010010 |
| S | 83 | 01010011 |
| T | 84 | 01010100 |
| U | 85 | 01010101 |
| V | 86 | 01010110 |
| W | 87 | 01010111 |
| X | 88 | 01011000 |
| Y | 89 | 01011001 |
| Z | 90 | 01011010 |
| [ | 91 | 01011011 |
| \ | 92 | 01011100 |
| ] | 93 | 01011101 |
| ^ | 94 | 01011110 |
| _ | 95 | 01011111 |
| ` | 96 | 01100000 |
| a | 97 | 01100001 |
| b | 98 | 01100010 |
| c | 99 | 01100011 |
| d | 100 | 01100100 |
| e | 101 | 01100101 |
| f | 102 | 01100110 |
| g | 103 | 01100111 |
| h | 104 | 01101000 |
| i | 105 | 01101001 |
| j | 106 | 01101010 |
| k | 107 | 01101011 |
| l | 108 | 01101100 |
| m | 109 | 01101101 |
| n | 110 | 01101110 |
| o | 111 | 01101111 |
| p | 112 | 01110000 |
| q | 113 | 01110001 |
| r | 114 | 01110010 |
| s | 115 | 01110011 |
| t | 116 | 01110100 |
| u | 117 | 01110101 |
| v | 118 | 01110110 |
| w | 119 | 01110111 |
| x | 120 | 01111000 |
| y | 121 | 01111001 |
| z | 122 | 01111010 |
| { | 123 | 01111011 |
| | | 124 | 01111100 |
| } | 125 | 01111101 |
| ~ | 126 | 01111110 |
Binary to text (decoding)
- Split the binary into groups of 8 bits (one byte each).
- Convert each byte to a number:
01001000= 72 and01101001= 105. - Look the numbers up in the ASCII table above (or decode as UTF-8 for other characters): 72 is H and 105 is i.
So 01001000 01101001 decodes to Hi. Paste binary into the translator above and it does this for you, and tells you if the length is not a multiple of 8 bits or the bytes are not valid text.
Frequently asked questions
How to write "I love you" in binary code?
In 8-bit ASCII/UTF-8, "I love you" is 01001001 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101. Each group of 8 bits is one character, and 00100000 is the space.
What does 666 mean in binary?
It depends on whether you mean the number or the text. The number 666 is 1010011010 in binary. The text "666" (three digit characters) is 00110110 00110110 00110110.
Can I convert text to binary?
Yes. Type or paste text into the translator above and it shows each character as 8-bit binary bytes, using UTF-8 so any language and emoji work.
What is 11111111 in binary code?
11111111 is the largest 8-bit value: 255 in decimal (FF in hexadecimal). On its own it is not a valid UTF-8 text byte, so it does not decode to a character.
How do you convert a letter to binary?
Each character is first turned into one or more bytes using UTF-8. Each byte is a number from 0 to 255, written as eight binary digits. For example, the letter A is byte 65, which is 01000001.
Why does an emoji become several bytes?
UTF-8 uses one byte for basic English letters, digits and punctuation, and two to four bytes for other characters. Most emoji need four bytes, so they appear as four 8-digit groups.
Do I need spaces between bytes when decoding?
No. You can paste groups separated by spaces, line breaks or commas, or one long string of 0s and 1s. The length must be a multiple of 8.
What is the difference between ASCII and UTF-8?
ASCII defines 128 characters. UTF-8 is a superset: the first 128 characters are encoded exactly like ASCII, and it can also encode every other Unicode character.
What happens if my binary is invalid?
The translator tells you if the input contains characters other than 0, 1, spaces and commas, if the length is not a multiple of 8, or if the bytes are not valid UTF-8.
Why do I get a 'not a multiple of 8' error?
Each byte is exactly eight bits, so the total number of 0s and 1s must divide evenly by 8. The error usually means a digit is missing or extra, or leading zeros were dropped (for example 1000001 instead of 01000001). The message shows how many bits were found.
Is my text uploaded anywhere?
No. The conversion runs entirely in your browser with JavaScript. Your text is not sent to a server or stored.
How do I convert binary to decimal?
Add the values of the positions that contain a 1. For an 8-bit byte the positions are worth 128, 64, 32, 16, 8, 4, 2 and 1, so 01100001 is 64 + 32 + 1 = 97. Choose Decimal in the Output format menu to see the decimal value of every byte of your text.