What is binary code and how does it work?
A way to store anything with just 0 and 1. Text gets a number for each character, and each number is written in bits, 8 to a byte.
Type text to turn it into binary code, or paste 0s and 1s to read them as English. Every letter's byte is listed below.
Each character and its bytes
Type in either box to see every character with its code and its bytes in binary and hex.
The binary code for alphabets, numbers and symbols in 8-bit ASCII. Press any one to copy its byte.
A binary code generator and decoder in one: write in either box and the other follows, with spaces, commas or no gaps at all.
Every byte is worked out in this tab, so private messages and homework answers never leave your device.
Text to binary or binary to English, then how to translate binary into letters by hand.
Write words in the Text box to turn them into binary, or paste 0s and 1s in the Binary box. Hi is 01001000 01101001.
Binary writes each byte as 8 bits. Switch Show as to hex, decimal or octal, and pick UTF-8, UTF-16 or 7-bit ASCII.
Copy the result to paste in a message, or save it as a TXT file. Letter by letter lists every character's bytes.
Binary to text works one byte at a time. Split the 0s and 1s into groups of eight, turn each group into a number with the place values 128, 64, 32, 16, 8, 4, 2 and 1, then look the number up in the ASCII table: 01001000 is 72, which is H.
Paste binary in any layout. Groups can be split by spaces, commas or new lines, or run together with no gaps, in which case they are cut into eights. A 0b in front of a group is ignored, and a run of 7-bit groups is read as 7-bit ASCII.
A group that makes no character, such as a few bits left over at the end or a broken UTF-8 sequence, shows as � in the text and is named under the box, so the rest of the message still reads.
Every letter, digit and punctuation mark has a number in ASCII, and text to binary writes that number in base 2. Capital A is 65, or 01000001, and the capitals run in order up to Z at 90, which is 01011010.
Lowercase letters are the capitals plus 32, so a is 01100001: only the third bit from the left changes. Digits start at 48, so the digit 5 is 00110101, not 101, and a space is 00100000. ASCII to binary always gives 8 bits per letter here.
ASCII stops at 127, so accents, other alphabets and emoji need Unicode. UTF-8, the default here and on most of the web, keeps ASCII letters at one byte and uses two to four for the rest: é is 11000011 10101001 and 😀 takes four bytes.
UTF-16 writes each character as one or two 16-bit groups, the way Java, JavaScript and Windows store text, and UTF-32 gives every character a single 32-bit group. 7-bit ASCII drops the leading 0, so A is 1000001, and lists any character it cannot write.
Show as changes how each byte is written. Text to hex gives two digits per byte, so CAT is 43 41 54, the form ASCII to hex tables and programmers use. Decimal gives the plain character codes, 72 105 for Hi, and octal gives three digits each.
It works backwards too: set Show as to Hex and paste hex to text, or pick Decimal for a list of character codes. Hex can be pasted in pairs, with 0x in front, or as one long run of digits that is cut into bytes.
Paste binary with spaces, commas or no gaps, with 0b in front or in 7-bit groups, and read the text.
Letter by letter lists every character beside its code point and its bytes in binary and in hex.
Show the same text as hex, decimal or octal codes, and paste any of them back to read the words.
Accents, Chinese, Arabic and emoji turn into their real UTF-8 bytes, or into UTF-16 and UTF-32.
Open a TXT file to turn its text into binary, or a file of 0s and 1s to read it, then save as TXT.
Capitals, lowercase, digits and symbols with their bytes. Press any letter to copy its binary code.
The text you type and its binary are handled in this browser tab only.
Every byte is worked out by code running in this tab. No text or binary is sent to a server.
The last text and your settings stay in this browser, so a refresh keeps them. Clear wipes both.
No sign-up, no email and no limit on how many messages you translate in a day, all at no cost.
A way to store anything with just 0 and 1. Text gets a number for each character, and each number is written in bits, 8 to a byte.
Split it into groups of eight, add up the place values of each 1 (128, 64, 32 and down to 1), then look the number up in ASCII.
It spells Hi. 01001000 is 72, a capital H, and 01101001 is 105, a lowercase i. Paste it in the Binary box to check it yourself.
Hello in binary is 01001000 01100101 01101100 01101100 01101111: one byte per letter, starting with a capital H.
01001001 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101, with a byte for each space.
Capital A is 01000001, which is 65, and lowercase a is 01100001, which is 97. The two differ by one bit, worth 32.
One for each ASCII letter, digit and symbol. In UTF-8, accented letters take two, most Asian scripts three and emoji four.
Type your name in the Text box and copy the binary. Each letter is 8 bits, so a five-letter name comes to 40 bits.
Still stuck, or found a problem? Email dobliquestudio@gmail.com and we will help.