Text to Binary Converter
Convert text to binary, hexadecimal, octal or decimal byte values and decode them back to text. UTF-8 aware, so accents and emoji work. Free and private.
How to use Text to Binary
- 1Choose Text to Code or Code to Text, then the number base.
- 2Type your text, or paste the byte values you want to decode.
- 3Adjust the separator, prefix and padding, then copy or download the result.
What makes it better
- Binary, hexadecimal, octal and decimal
- UTF-8 encoding: é is two bytes and an emoji is four
- Choose separator, prefix (0x, 0b, \x), uppercase hex and padding
- Decoding tolerates prefixes, commas and missing padding
- Precise errors that point to the byte and digit that is wrong
About Text to Binary
Text to Binary encodes your text as UTF-8 bytes and shows each byte in binary, hexadecimal, octal or decimal. It also works the other way: paste a list of byte values and read the text. Accented letters and emoji become several bytes, exactly as they are stored in files.
Common uses
- Learn how characters are stored by seeing the bytes behind a word.
- Prepare binary or hex strings for a programming exercise or puzzle.
- Decode a binary message someone sent you as 0s and 1s.
- Inspect how accents and emoji are encoded in UTF-8.
Example
Input
Hi!
Result
01001000 01101001 00100001
Good to know
- Encoding uses UTF-8, not UTF-16 or older code pages, so byte values for non-English characters may differ from other tools.
- Without separators, binary must be written in groups of 8 digits, hex in 2 and octal in 3. Decimal needs a separator.
- Decoding stops with an error if the bytes are not valid UTF-8 text, rather than guessing.
Text to Binary FAQ
How do I convert text to binary?
Each character is turned into its UTF-8 byte values and each byte is written as eight binary digits. For example, “A” is 65, which is 01000001.
Why does “é” give two bytes?
UTF-8 uses one byte for plain ASCII characters and two to four bytes for everything else. “é” is C3 A9 in hexadecimal, and most emoji take four bytes.
How do I decode binary back to text?
Switch to Code to Text, choose Binary and paste the bits. Spaces, commas and 0b prefixes are ignored, and bytes shorter than 8 digits are accepted.
What does “is not valid in binary at byte 3” mean?
The third byte contains a digit that the chosen base does not allow, such as a 2 in binary. Fix it or pick the right base.
Can I produce \x41 style hex for code?
Yes. Choose Hex, set the prefix to \x and the separator to none to get a string like \x48\x69, ready for many programming languages.