More
More
Text to Binary Translator
Convert text to binary, hex, octal and decimal bytes and back, with UTF-8 explained.
Free tools that run in your browser. Nothing you type, open or create is uploaded to NerdBible or anyone else.
Type in any box. The others follow, all from the same UTF-8 bytes.
Character by character
| Character | Code point | Bytes | Hex | Binary |
|---|
Text is turned into bytes with UTF-8, the encoding used by almost every web page. A letter of the English alphabet is one byte, accented letters such as é take two, most other scripts two or three, and an emoji four, so the binary for an emoji is 32 digits long. Some emoji are several code points joined together and take even more. Everything runs in your browser and nothing is sent anywhere.
How to use it
- Type or paste text in the Text box to see its binary, hex, octal and decimal bytes.
- Or paste binary, hex, octal or decimal into its own box to turn it back into text.
- Choose whether bytes are separated by spaces and whether hex is uppercase, then copy what you need.
Questions
How do I convert text to binary?
Each character is first turned into one or more bytes using UTF-8, then each byte is written as eight binary digits. The letter A is byte 65, which is 01000001 in binary.
Why does an emoji give 32 bits?
UTF-8 uses one byte for the basic English letters, digits and symbols, and up to four bytes for everything else. Most emoji need four bytes, which is 32 binary digits.
Can I paste binary without spaces?
Yes, as long as the number of digits is a multiple of eight, so it can be split into whole bytes. Hex without spaces works in pairs of digits and octal in groups of three.
What does it mean if the bytes are not valid UTF-8?
The bytes do not form complete characters, for example a multi-byte character cut in half or bytes from another encoding. Those parts show as a replacement symbol in the Text box.
How is this different from a number base converter?
This tool treats input as text and shows the bytes behind each character. A number base converter, such as our Number Base Converter, changes a single number between binary, decimal and hex.
About this tool
About the text to binary translator
Computers store text as bytes, and this tool shows those bytes in five ways at once: as text, binary, hexadecimal, octal and decimal. Type in any box and the other four update, so it works in both directions: text to binary, binary to text, hex to text and so on.
Text is encoded with UTF-8, the encoding used by almost every web page. Plain English letters take one byte each, but accented letters take two, many scripts take three and most emoji take four, so the binary for a single emoji is 32 digits long. A table underneath breaks the text down character by character, with its code point and its bytes.
- Flexible input: bytes can be separated by spaces or commas, or run together, and prefixes such as 0x or percent signs are understood.
- Your format: choose spaces or no separator and uppercase or lowercase hex.
- Clear errors: invalid digits or bytes that do not form valid UTF-8 are pointed out.
This is different from the Number Base Converter, which changes one number between bases. This tool treats the input as text. Everything runs in your browser.
Related tools
- Number Base ConverterBinary, octal, decimal and hex.
- Base64 Encode & DecodeEncode and decode Base64 text.
- Escape, Encode & DecodeEscape and unescape text for JSON, JavaScript, HTML entities, XML, SQL, CSV, regex and URLs.
- Morse Code TranslatorTranslate text to Morse code and back, play it as sound or light, with a full chart.