Text to Binary Converter

Type text and the UTF-8 bytes appear in the radix you choose: binary, octal, decimal or hexadecimal. Pick a separator (space, comma, line break or none), and tick the options for uppercase Hex, the 0x prefix or zero padding. Paste the bytes in the other box to get the text back. Values above 255 are reported as out of range.

Text to Binary Converter runs entirely in your browser: the text you paste is never sent to a server. It is free and needs no sign-up.

How to use it

  1. Choose the direction In Text to Binary Converter, choose Text to numbers to see the UTF-8 bytes of your text, or Numbers to text to turn numbers back into text.
  2. Set base and separator Pick the number base: binary, octal, decimal or hex. Then choose a separator: space, comma, new line or none. Decimal numbers always need a separator.
  3. Pad and copy Tick Pad with leading zeros, Upper case for hex, or Add prefix 0b or 0x. Each number must be from 0 to 255, and Copy takes the result.

Questions

How many numbers does one Chinese character use?

Text is converted to UTF-8 bytes first. Most English letters use one byte, while a common Chinese character uses three bytes, so one character can become three numbers in the result.

Why does Numbers to text say a number is too large?

Each number stands for one byte, so it must be between 0 and 255. A larger number is refused, and the message gives its position. Bytes that are not valid UTF-8 cannot be shown as text.