Text ↔ Binary / Hex Converter
Convert text to binary or hexadecimal and back. Each character is encoded as its ASCII/Unicode value.
About This Tool
The Text to Binary Converter encodes and decodes text using binary (base 2) or hexadecimal (base 16) representation. Each character is converted using its ASCII/Unicode code point. Binary output uses 8 bits per character, space-separated for readability. Hex output uses 2 hex digits per character.
The tool supports four modes: text → binary, binary → text, text → hex, and hex → text. All conversion runs in your browser — no data is sent to any server.
How to Use
- Select the conversion direction using the mode tabs at the top.
- Select the encoding format: Binary (01001000) or Hex (48).
- Type or paste your input text (or binary/hex for decoding).
- Click Convert to generate the output.
- Click Copy to copy the result to your clipboard.
Use Cases
Computer science students learn binary and hexadecimal representations of ASCII characters as part of data representation coursework. Developers debug byte-level data by converting strings to hex to inspect raw values. Security analysts decode binary-encoded messages in CTF challenges. Educators create exercises where students encode and decode simple messages in binary.
FAQ
- Does it support Unicode (non-ASCII characters)? — Yes. The tool uses JavaScript's charCodeAt() which returns the Unicode code point, not just the ASCII value.
- What delimiter separates binary groups? — Binary groups (one per character) are separated by spaces. When decoding, both space-separated and unseparated 8-bit groups are accepted.
- What is the difference between binary and hex output? — Binary uses base 2 (only 0s and 1s, 8 digits per char); hex uses base 16 (0–9, A–F, 2 digits per char). Hex is more compact.