Text to Binary
Convert text to binary, octal or hex and back, using exact UTF-8 byte sequences.
How to use it
- Pick the Direction: Text to code, or Code to text.
- Pick the Base: binary (base 2), octal (base 8) or hex (base 16).
- Pick the Format: Space separated (
01001000 01101001) or Continuous (0100100001101001). - Type or paste, then press Generate. Encoding walks the text as UTF-8 bytes; decoding validates every token before touching the decoder.
- Bad input is rejected with a specific message, for example a non-binary digit in base 2 or a chunk wider than one byte.
Common use cases
- Learning encoding - see the actual bytes behind letters, spaces and multi-byte characters.
- Writing test fixtures - produce exact binary or hex sequences for parser tests.
- Reading encoded blobs - decode a hex or binary dump from a log or a protocol capture back to text.
- Checking clipboard payloads - verify that a copied byte string is well formed before pasting it into a tool.
Why it stays private
TextEncoder and TextDecoder are browser built-ins; the conversion happens in page memory. Your text, your logs and your token dumps never touch a server.
FAQ
Q: Why does one Chinese character become three bytes? A: Characters outside ASCII take multiple bytes in UTF-8. A typical CJK ideograph is three bytes, and an emoji can be four, which is exactly what the byte count in the status line shows.
Q: What input formats does decoding accept? A: Space-separated tokens, or one continuous string that is split at the fixed byte width (8 bits for binary, 3 digits for octal, 2 for hex). A continuous string whose length is not a multiple of the width is rejected instead of guessed.
Q: What happens if the bytes are not valid UTF-8? A: Decoding is strict, so a broken sequence raises an error rather than showing replacement characters. That way a corrupted dump never silently turns into wrong text.
Your data stays on this device
Text to Binary runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.