All tools

Text to binary converter

Type in either box โ€” the other updates as you go. Text is encoded as UTF-8, so one emoji becomes four bytes.

7 bytes ยท 4 characters

About the text to binary

Convert text into the bytes a computer actually stores โ€” as binary, hexadecimal, octal or decimal โ€” and turn byte codes back into readable text. Text is encoded as UTF-8, the encoding the web uses, so accented letters, non-Latin scripts and emoji convert and round-trip correctly. Everything runs in your browser.

How to use it

  1. Choose a format: Binary, Hex, Octal or Decimal.
  2. Pick whether bytes are separated by a space or run together.
  3. Type or paste text in the Text box to see its bytes.
  4. Or paste byte codes into the bytes box to decode them back to text.
  5. Use Copy to grab either side.

Questions

Why does one emoji turn into four bytes?
UTF-8 uses one byte for basic ASCII characters and two to four bytes for everything else. Most emoji sit outside the first 65,536 code points, so they need four bytes.
Why do I get a โ€œnot valid UTF-8โ€ error?
The bytes you entered do not form a complete UTF-8 sequence โ€” for example, the first byte of a multi-byte character without the bytes that must follow it. The tool reports this instead of guessing or inserting replacement characters.
How do I convert binary to text without spaces?
Paste the unbroken string of 0s and 1s. As long as its length is a multiple of 8, it is split into bytes automatically. Hex works the same way in pairs of digits and octal in groups of three.
Why can't decimal bytes be written without a separator?
Decimal byte values are one to three digits long, so a run like 7210 is ambiguous. Binary, hex and octal can be zero-padded to a fixed width, which is what makes the no-separator option possible for them.