Binary Converter: Text to Binary, Hex and Octal
Encode text as UTF-8 bytes in binary, hexadecimal or octal, or paste codes to decode them back to text. Choose a space, comma or no separator between codes.
Runs in your browser: your files and text are not uploaded. Free, no account needed.
Last updated: · Reviewed by the QuickTooly Team
Binary Converter Guide
How Each Character Is Encoded
The converter turns the text into UTF-8 bytes and writes each byte in the chosen base. For plain English letters, digits and punctuation each character is one byte equal to its ASCII value, so the output matches what an ASCII table gives you.
- Binary (base 2): padded to 8 digits.
- Hex (base 16): uppercase, padded to 2 digits.
- Octal (base 8): padded to 3 digits, so a space (32) is 040.
Worked Example: "Hi"
| Character | Code | Binary | Hex | Octal |
|---|---|---|---|---|
| H | 72 = 64 + 8 | 01001000 | 48 | 110 |
| i | 105 = 64 + 32 + 8 + 1 | 01101001 | 69 | 151 |
With the Space separator, "Hi" encodes to 01001000 01101001.
How Decoding Splits the Input
When decoding, the tool splits the input on spaces, commas and line breaks. If there are none, it cuts the string into fixed chunks of 8 binary digits, 2 hex digits or 3 octal digits. Each chunk must be a valid byte (0 to 255) in the selected base, or you get an error naming the bad chunk. The bytes are then read back as UTF-8 text.
Limits to Know Before You Rely on the Output
- Accented letters take more than one byte: é encodes as the two UTF-8 bytes
C3 A9, the same bytes a file or network packet would contain. - Emoji take four bytes: 😀 encodes as
F0 9F 98 80and decodes back to 😀. - Decoding fails with an error if the bytes are not valid UTF-8, for example a lone
E9from a Latin-1 file. - Leading and trailing spaces in the input are trimmed before conversion.
Frequently Asked Questions
Why is the Bytes figure higher than the character count?
The figure is the UTF-8 size of the text. Plain ASCII text is one byte per character; accented letters take two bytes and emoji take four.
Why did my decoded text come out as gibberish?
The bytes were probably not UTF-8 text to begin with, or unseparated codes were cut at the wrong places. Check the mode and add spaces between codes. Codes that do not fit the selected mode give an error instead of output.
Can I convert a number such as 255 to binary?
Not directly. The tool encodes text, so "255" becomes three codes, one for each digit character. It does not convert numbers between bases.
Related Tools
- HTML Entities Encoder/Decoder: write characters as numeric codes that browsers render, such as H.
- Morse Code Translator: another character-by-character encoding, with audio playback.
- File Hash Calculator: when you need a hex fingerprint of a file rather than its characters.