Text to Binary, Hex, Octal & Decimal

Convert UTF-8 text into 8-bit binary, hexadecimal, octal, or decimal byte values, or decode byte sequences back into readable text.

Private by architecture: All processing is 100% client-side memory. Your data never leaves this browser tab.
Text input
0 lines · 0 charsUTF-8
Byte output
0 lines · 0 chars

About This Tool

Encodes UTF-8 strings into 8-bit binary, hexadecimal, octal, or decimal byte representations using TextEncoder, and decodes byte sequences back into text using TextDecoder.

Because encoding operates on UTF-8 bytes rather than UTF-16 code units, multi-byte characters (such as accented letters, CJK characters, or currency symbols) round-trip accurately.

Key Features

  • Four byte bases: Switch between 8-bit binary (01001000), hex (48), octal (110), and decimal (72) byte values.
  • Full UTF-8 awareness: Multi-byte Unicode code points encode to their exact 2, 3, or 4 UTF-8 bytes and decode cleanly back to text.
  • Flexible separators: Format output with spaces, commas, or as a continuous byte stream, and decode either spaced or continuous binary/hex input.
  • Strict validation: Pinpoints malformed byte tokens, out-of-range values (> 255), or broken UTF-8 sequences with clear error messages.

Frequently Asked Questions

How are non-ASCII characters like € encoded?
Text is encoded as UTF-8 bytes first. For example, the Euro sign (€, U+20AC) takes three UTF-8 bytes: E2 82 AC in hex, or 11100010 10000010 10101100 in 8-bit binary.
Can I paste a continuous binary or hex string without spaces?
Yes. When decoding binary without spaces, the stream is split every 8 bits; when decoding hex without spaces, it is split every 2 hex digits.
Why did decoding fail with "not valid UTF-8 text"?
Not every arbitrary byte sequence is valid UTF-8 (for example, 0xFF is never valid in UTF-8). Make sure the selected byte base matches the pasted data.