Toolstia / Binary text converter
Binary converter: text to binary and binary to text
Computers store every character as numbers, and binary is how those numbers are written out as ones and zeros. This converter lets you see that mapping for any text you type. Pick a direction, choose binary, hexadecimal, decimal or octal, and the result updates as you type. The same page also reads codes back into text, so you can decode a string of ones and zeros that someone sent you.
Students use it to check homework on character encoding, developers use it to inspect the bytes behind a string, and puzzle fans use it to write or solve coded messages. It works on text only. It will not open a binary file such as an image or a program, and it does not encrypt anything: the output is simply another way of writing the same characters.
How it works
- Choose text to code, or code to text.
- Pick binary, hex, decimal or octal.
- Type or paste, then copy the result.
What you get
Each byte of the text becomes one value. "Hi" is 01001000 01101001 in binary, 48 69 in hex and 72 105 in decimal.
Characters beyond English
A letter such as the Bangla "ব" takes three bytes in UTF-8, so it becomes three values. Converting the codes back gives the original character.
Reading codes back
Separate values with spaces or commas. Binary may also be one long run of digits if its length is a multiple of 8. Hex values may start with 0x.
How to convert binary to text
Split the binary into groups of 8 digits, turn each group into a number (01001000 is 72), then look up the character for that number (72 is H). The tool does all of this at once: paste 01001000 01101001 and it returns Hi.
Examples
A is 01000001, B is 01000010 and a is 01100001. The word Hello is 01001000 01100101 01101100 01101100 01101111. A space is 00100000.
Clear errors
A value that is not valid for the format, larger than one byte, or a set of bytes that is not valid text gives a message instead of garbled output.
Worked example: Hello, World! in four bases
The text "Hello, World!" is 13 characters and 13 bytes. In binary it is 01001000 01100101 01101100 01101100 01101111 00101100 00100000 01010111 01101111 01110010 01101100 01100100 00100001. In hexadecimal the first byte, H, is 48; in decimal it is 72; in octal it is 110.
Take the short string "Hi!". Hex gives 48 69 21, decimal gives 72 105 33 and octal gives 110 151 041. Octal values are padded to three digits, hexadecimal to two and binary to eight, so every byte lines up neatly in columns.
Why one character can become several bytes
The tool encodes text as UTF-8. English letters, digits and common punctuation use one byte each, which matches ASCII. Other characters use more. The letter é becomes two bytes (11000011 10101001), the euro sign € becomes three (11100010 10000010 10101100), the Bangla letter ব becomes three (11100000 10100110 10101100) and the emoji 😀 becomes four (11110000 10011111 10011000 10000000).
So a message that looks short can produce many groups. Decoding reverses this: the bytes are put back together and read as UTF-8, so a multi-byte character is only recovered if all of its bytes are present and in the right order.
Upper case and lower case differ by one bit
In ASCII, a capital letter and its lowercase form differ by exactly one bit, the third from the left. Cat is 01000011 01100001 01110100 and cat is 01100011 01100001 01110100. The only change in the first byte is 01000011 becoming 01100011. That is why old systems could switch case by flipping a single bit, and it is a handy fact for reading binary by eye.
Digits sit in a block too. The character 0 is 00110000 and 9 is 00111001, so the code for a digit character is 48 plus its value. Note that the character 5 is not the same as the number five: the first is stored as 00110101, the number five itself is 00000101.
Formatting rules when decoding
Separate values with spaces or commas. For binary, one unbroken string of digits is also accepted as long as its length is a multiple of 8, so 0100100001101001 decodes to Hi. A string that is not a multiple of 8 produces an error asking you to add spaces between bytes. Hexadecimal values can carry a 0x prefix, as in 0x48 0x69.
Groups of four bits are the most common formatting mistake. Pasting 0100 1000 is read as two separate values, 4 and 8, giving control characters instead of H. If your source splits bytes into nibbles, remove the spaces between the halves first.
When decoding gives an error
Each value must be valid for the format you chose. A digit 2 in binary, an 8 in octal or a letter beyond F in hex is rejected, and the message names the value. A value larger than 255 is rejected because each value stands for one byte. Decimal 300 cannot be a single byte, so run-together decimal such as 72105 will fail and needs spaces: 72 105.
Even when every value is valid, the bytes as a whole must form valid UTF-8. A lone byte like 11000011 is the start of a two-byte character with its second half missing, so the tool reports that the bytes are not valid text instead of showing a broken character. Bytes taken from a compressed file or an image will almost always fail this check, which is the expected result.
Questions
Is it the same as ASCII?
For English letters and digits, yes. For other characters UTF-8 is used, which needs more than one byte each.
Why are my binary groups 8 digits?
One byte is 8 bits.
How do I translate binary to text?
Choose code to text, pick binary, paste your 0s and 1s (spaces between groups are fine) and the text appears.
What is 01001000 01101001 in text?
Hi.
Can I convert a binary file?
No. This tool converts text only.
Is it private?
Yes. It runs in your browser.
Is binary a form of encryption?
No. It is only a different way of writing the same characters, and anyone can convert it back. Do not use it to hide sensitive information.
Why are the hexadecimal letters in upper case?
The tool prints hex in capitals, such as 4F. Decoding accepts either case, so 4f and 4F are read the same way.
Can I convert a number such as 255 into binary with this?
No. This tool converts text characters. Typing 255 gives the codes for the three characters 2, 5 and 5, not the binary value of the number. Use a number base converter for arithmetic conversions.
How big can the input be?
There is no fixed limit, but very long text produces very long output, since each character becomes at least 8 binary digits. A paragraph is fine. Large documents can slow the page down.
Does a line break get encoded?
Yes. A new line is a character like any other and appears as 00001010 (decimal 10) when encoded.