Input Text

Binary Output

Bits:Separator:

What Is a Text to Binary Converter?

At the hardware level, computers store everything as sequences of 0s and 1s — the binary number system. Every character you type maps to a number via a character encoding standard. The most common is ASCII (and its superset Unicode), which assigns a unique integer to each character. A Text to Binary converter takes those integers and renders them in base-2 notation — padding each to 8 bits so you get the familiar byte-aligned view that matches what the CPU actually works with. For example, the letter "H" has the decimal code 72, which in binary is 01001000. This tool is handy when you're studying how character codes work, debugging low-level data streams, learning about character encoding, or just satisfying curiosity about what text looks like "under the hood." You can also toggle a character mapping table to see each character paired with its binary code side by side — useful for learning or for presentations. For the reverse operation, check the Binary to Text converter. The Unicode Standard defines how characters beyond ASCII (accented letters, CJK, emoji) are encoded — this tool uses JavaScript's native charCodeAt() which returns UTF-16 code units.

How to Use

1

Type or paste your text

Drop any text into the left panel. Each character — including spaces and newlines — will be converted to its binary equivalent. You can also click "Upload" to load a .txt file.

2

Choose bit grouping and separator

Pick "8-bit" (standard, zero-padded) or "No padding" to get the raw binary value. Then choose how codes are separated: space, newline, or no separator at all. The output updates live as you type.

3

Copy, download, or inspect the char map

Hit "Copy" to grab the binary string to your clipboard, "Download" to save it as a .txt file, or toggle "Char Map" to see a table of each character paired with its binary code.

Example

Here's a worked example. The two-character string "Hi" converts to two 8-bit binary codes — one for "H" (decimal 72) and one for "i" (decimal 105).

"Hi" → Binary (8-bit, space-separated)

Input Text
Hi

→ 8-bit Binary (space-separated)

Binary Output
01001000 01101001

Frequently Asked Questions

Why is each character 8 bits?

One byte (8 bits) is the standard storage unit for a character in ASCII and most single-byte encodings. It can represent 256 values (0–255), which is more than enough for all 128 ASCII characters. This tool pads shorter binary values with leading zeros to always show the full 8-bit byte. If you toggle "No padding," you'll see the minimal binary representation instead.

What about characters outside ASCII (accented letters, emoji, CJK)?

JavaScript uses UTF-16 internally. charCodeAt() returns the UTF-16 code unit for each position in the string, which matches the Unicode code point for characters in the Basic Multilingual Plane (U+0000–U+FFFF). For emoji and other supplementary characters that use surrogate pairs, each surrogate will appear as a separate code. If you need full Unicode code point handling, use codePointAt() instead. See MDN charCodeAt() for details.

How do I convert binary back to text?

Use the Binary to Text converter on this site. Paste your binary string and it will decode each 8-bit group back to its character.

Is my data sent to a server?

No. All conversion happens locally in your browser using JavaScript. Nothing is sent to any server. You can even disconnect from the internet after the page loads and the tool will keep working.

What does "no separator" output look like?

With no separator, all binary codes are concatenated into one long string. For example "Hi" becomes 0100100001101001. This is the raw bitstream format sometimes used in data transmission or file format documentation. It's harder to read but more compact.

Can I convert a whole file to binary?

Yes — click "Upload" to load a plain text file (.txt). The tool will read its content and convert every character. Keep in mind that large files will produce very long binary strings (8× the number of characters), so for files over a few KB the output can get unwieldy.

Related Tools