# Text to Binary Converter

URL: https://hifreetools.com/developer/text-to-binary

> Convert text to 8-bit binary and decode binary back to text, with optional decimal and hex output. Runs entirely in your browser, so nothing is uploaded.

## Quick answer

A text-to-binary converter turns each character into its numeric byte value and writes that value in base 2 as an 8-bit group, separated by spaces. For example, "Hi" becomes "01001000 01101001" because the letter H is byte 72 and i is byte 105. Decoding reverses this: each 8-bit group is read as a number and mapped back to a character. It is a reversible encoding, not encryption.

Each character is first turned into its UTF-8 bytes. Every byte (0–255) is then written in the chosen base — binary padded to 8 bits, decimal, or hex padded to 2 digits — and the groups are joined with spaces. ASCII letters, digits, and punctuation each become a single 8-bit group; characters outside ASCII, such as accented letters or emoji, become two to four bytes. Decoding splits the input on whitespace, parses each group as a number, validates that it fits in one byte, and rebuilds the original text from those bytes using UTF-8. All of this happens locally in your browser.

## Examples

- Encode "Hi" to binary: Hi → 01001000 01101001
- Encode "Cat" to binary: Cat → 01000011 01100001 01110100
- Encode "Hi" to hex: Hi → 48 69
- Decode binary back to text: 01000010 01111001 01100101 → Bye

## FAQ

**How is text converted to binary?**
Each character is turned into its UTF-8 byte value, and that number is written in base 2 padded to 8 bits. For example, the letter A is byte 65, which is 01000001 in binary.

**Why is each group 8 bits long?**
One byte is 8 bits and can hold values 0 through 255, which covers every ASCII character. Padding to 8 bits keeps the groups a fixed, unambiguous width so they decode reliably.

**Can it convert binary back to text?**
Yes. Switch to the Binary → Text mode, paste space-separated 8-bit groups, and each group is read as a byte and mapped back to its character using UTF-8.

**Does it support emoji and accented characters?**
Yes. Those characters are encoded as multiple UTF-8 bytes, so a single emoji or accented letter may produce two to four 8-bit groups that still round-trip exactly.

**What's the difference between the binary, decimal, and hex output?**
They are the same byte values shown in different number bases. The letter H is 01001000 in binary, 72 in decimal, and 48 in hex — identical data, different notation.

**Is binary the same as encryption?**
No. Binary is a reversible encoding that anyone can decode instantly. It provides no secrecy, so it should never be used to protect passwords or sensitive data.

**Is my text sent to a server?**
No. The conversion runs entirely in your browser using JavaScript, so the text you enter never leaves your device.


## Sources

- [MDN — TextEncoder (UTF-8 encoding)](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder)
- [MDN — Number.prototype.toString() (radix)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)
- [Wikipedia — ASCII](https://en.wikipedia.org/wiki/ASCII)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Text to Binary Converter", https://hifreetools.com/developer/text-to-binary
