Text to Binary / Hex Converter
See how your text is stored as bytes. Pick an encoding (UTF-8, UTF-16 or Shift_JIS) and a base, and the tool shows each byte in binary, octal or hex. Switch to "Number → Text" to turn bytes back into text. To convert plain numbers between bases, use the Base Converter. For Base64, see the Base64 Encoder/Decoder, and for files or garbled text, the Encoding Converter.
🔒 Runs in your browser · Your data is never sent to a server
How to use
- Choose "Text → Number" or "Number → Text".
- Pick an "Encoding" and a "Base" (UTF-8 is the usual choice).
- Type text, or paste bytes as numbers, and the result appears automatically.
- Press "Copy" to copy the result.
Notes
- The same text produces different bytes in different encodings. For example, あ is E3 81 82 in UTF-8 and 82 A0 in Shift_JIS.
- In Number → Text mode, bytes can be separated by spaces, commas or line breaks, or written as one unbroken run. 0x and \x prefixes are accepted.
- Shift_JIS uses a mapping close to CP932 (Windows). Characters it cannot represent are replaced with a plain ? character.
- UTF-16 uses 2 bytes per character (4 for emoji and other supplementary characters). LE puts the low byte first, BE the high byte first.
- This is not encryption. Anyone can convert the numbers back to text.
Glossary
Byte sequence
The series of 8-bit values (0-255) a computer uses to store or send text. The encoding decides which numbers stand for which characters.
BOM
Byte Order Mark. A marker placed at the start of UTF-8 or UTF-16 data (EF BB BF for UTF-8) that signals the encoding and byte order. It is usually omitted.
Little-endian / Big-endian
The byte order used when one character takes several bytes, as in UTF-16. Little-endian (LE) stores the low byte first; big-endian (BE) stores the high byte first.
FAQ
Why does the same character give different bytes per encoding?
An encoding is just an agreement on which bytes stand for which characters. For example, "あ" is E3 81 82 (3 bytes) in UTF-8, 82 A0 (2 bytes) in Shift_JIS, and 30 42 in UTF-16BE. Plain ASCII letters and digits are identical in UTF-8 and Shift_JIS.
Do I need separators when converting numbers back to text?
No. Spaces, commas and line breaks all work, and so does one unbroken run. Without separators the input is cut every full byte (8 binary, 3 octal or 2 hex digits), so a missing digit causes an error. 0x and \x prefixes are accepted too.
Some characters turn into "?" (3F) in Shift_JIS. Why?
Shift_JIS has no code for characters such as emoji and some symbols, so they are replaced with "?". The affected characters are listed below the result. Choose UTF-8 or UTF-16 if your text contains them.
Why do I see "�" when converting numbers to text?
Some bytes are not valid in the selected encoding. Make sure the encoding matches the one used to create the bytes, and check that no bytes are missing.
Share this page
