Skip to content

Text to Binary Converter

Type text and see the bytes that encode it in UTF-8, written in binary, hexadecimal, octal or decimal with the separator you prefer: Hi is 01001000 01101001, or 48 69 in hex. Switch to the other direction to paste bytes and read the text. Accented letters, symbols and emoji work too, since they simply take more than one byte. If a byte is malformed, for example a binary group that is not 8 bits long, the page tells you which one and how to fix it. Everything stays in your browser.

UTF-8 bytes in binary

01001000 01101001

Characters
2
Bytes
2

How it works

  1. Choose the direction: text to bytes, or bytes to text.
  2. Choose the base (binary, hexadecimal, octal or decimal) and the separator between bytes.
  3. Type or paste your text, or your bytes, and read the result as you type.
  4. Press Copy result, or Swap to send the result back in as the input of the other direction.

What people use it for

  • Seeing what UTF-8 does to a character

    Check that é takes two bytes, 11000011 10101001, while e takes one.

  • Decoding bytes from a log or a puzzle

    Paste 48 65 6C 6C 6F and read Hello, or a row of 8-bit groups from a worksheet.

  • Teaching how text is stored

    Show a class the binary of a short word, with the bytes grouped by 8.

Questions

What is converted exactly?
The UTF-8 bytes of your text, as defined in RFC 3629. Characters of the basic ASCII range take one byte, so H is 01001000 (72, hex 48). Other characters take two to four bytes: é is the two bytes C3 A9 and the euro sign is the three bytes E2 82 AC. So the result for text with accents is longer than one group per character, and the page shows both the character count and the byte count.
Why does it reject some bytes?
In binary every byte must have exactly 8 bits, so 1001000 (7 bits) is refused with the 8-bit form to write instead. Hexadecimal takes 1 or 2 digits per byte, octal 1 to 3 digits up to 377, and decimal a whole number from 0 to 255. Bytes that do not form valid UTF-8, such as a lone byte of 11111111, are refused rather than shown as replacement characters.
How do separators work?
To encode, bytes are joined by a space, a comma and a space, or a new line, or with nothing at all. Without separator, each byte keeps its full width (8 binary digits, 2 hexadecimal digits, 3 octal digits), so the groups can be cut again; decimal needs a separator because its numbers have different lengths. To decode with a separator, spaces, commas, semicolons and line breaks are all accepted between bytes.
Is this encryption?
No. It is an encoding, a different way of writing the same bytes, that anyone can reverse with a tool like this one. Do not use it to hide a password or a secret. It is useful for learning, debugging and puzzles.