Text to Binary Converter

Convert text to binary, hexadecimal, octal or decimal and decode it back. UTF-8 aware, with configurable separators and zero padding. Runs entirely in your browser.

Convert text to binary, hex, octal or decimal — and back again. Both panes are editable, so you can encode text or paste an encoded string to decode it. Encoding is UTF-8 byte based, which means accented letters, CJK characters and emoji all survive the round trip.

How text becomes bytes

Characters are not bytes

A character is an abstract idea; a byte is eight bits of storage. Turning one into the other requires an encoding. This tool uses UTF-8, the encoding behind more than 98% of the web. In UTF-8 the ASCII range A-Z, a-z, 0-9 and common punctuation takes exactly one byte, so A is 01000001. Accented Latin and Greek take two bytes, most CJK characters take three, and emoji take four.

Why that matters for round trips

Older text-to-binary tools call charCodeAt and truncate to 8 bits. That works for plain ASCII and silently corrupts everything else, so é comes back as a different character or as a replacement glyph. Because this converter encodes real UTF-8 bytes, a string containing Chinese characters and an emoji decodes back to exactly what you started with.

Choosing a base

  • Binary shows the raw bit pattern, which is what you want when explaining how encoding works or debugging a bit-level protocol.
  • Hexadecimal is the practical default. Two hex digits per byte makes byte boundaries obvious, which is why every hex editor and network dump uses it.
  • Octal groups three bits at a time and appears mainly in Unix permissions and some C escape sequences.
  • Decimal is easiest to read aloud but hides the bit structure entirely.

Separators and padding

Zero padding makes every byte the same width — eight characters in binary, two in hex — so the output can be split reliably even with no separator between values. If you turn padding off, keep a separator, otherwise 1 and 10 run together and the result cannot be decoded unambiguously. When decoding, any mix of spaces, commas and newlines is accepted.

Open-source notice: uses the native TextEncoder and TextDecoder APIs built into the browser. No third-party library is used.

FAQs

Why is my Chinese character three groups of eight bits?
UTF-8 encodes most CJK characters as three bytes, and each byte becomes one eight-bit group. That is correct behaviour, not an error.
Can I decode binary that has no separators?
Yes, as long as it was zero-padded. The decoder falls back to fixed-width slicing — eight characters per byte in binary, two in hex — when it finds no separator.
Does this use ASCII or UTF-8?
UTF-8. For the plain ASCII range the two are identical, so English text looks the same either way, but UTF-8 also handles every other character correctly.
Why do I get an error decoding my input?
Every group must parse to a value between 0 and 255 in the selected base. A value of 256, a stray letter in binary mode, or the wrong base selected will all trigger it.
Is this the same as Base64?
No. Base64 packs three bytes into four printable characters to keep data compact. This tool renders each byte separately in a chosen numeric base, which is far more verbose but human-readable.
Is my text sent anywhere?
No. Encoding and decoding both use the browser's built-in TextEncoder and TextDecoder, entirely on your machine.