Convert ASCII text into its binary representation. Each character becomes one 8-bit byte — the character's ASCII code written in base 2, zero-padded to a full byte. Strict 7-bit ASCII means any character outside the 0-127 table stops the conversion and flags the position, so the output is always clean, byte-aligned binary.

ASCII ⇄ Binary Converter

Mode:
Options:
0 / 100,000 chars

How ASCII to binary encoding works

The converter reads the input one character at a time. For each character it takes the ASCII code — "A" is 65, space is 32, "z" is 122 — and writes that number in binary, padded with leading zeros to a full 8 bits. The result is a sequence of bytes, joined with whatever separator you choose. Because ASCII tops out at 127, every character fits in 7 significant bits with the eighth (top) bit always zero; any character with a higher code point is rejected before output.

Quick examples

ASCIIBinary
A01000001
Hi01001000 01101001
(space)00100000
01200110000 00110001 00110010
Hello01001000 01100101 01101100 01101100 01101111

How to use

  1. Type or paste ASCII text into Input. Any character with a code above 127 (é, 中, emoji, smart quotes) is rejected with its position flagged.
  2. The 8-bit binary appears in Output. Use the Separator control to switch between space-separated bytes, one byte per line, commas, or a continuous bitstream.
  3. To decode binary back, click Binary → ASCII at the top, or press Swap.
  4. Click Copy to grab the binary. All processing happens locally in your browser.

Real-world use cases

  • Teaching how text becomes bits. Encoding "Hi" to 01001000 01101001 shows directly that each letter is a number and each number is a fixed-width byte. It pairs naturally with the reverse binary to ASCII tool for a full round-trip lesson.
  • CTF and puzzle construction. Building a challenge that hides a flag as a binary string starts here: type the ASCII flag, pick a separator (or none for a denser puzzle), and you have a byte-exact bitstream to embed.
  • Generating test vectors. When testing a parser or a bit-level protocol, a known ASCII string encoded to binary gives a deterministic input whose expected bytes you already know, making failures easy to localise.
  • Bit-pattern inspection. Seeing a character in binary exposes structure that hex or decimal hide — for example, that uppercase and lowercase letters differ by exactly one bit (the 0x20 bit), visible as a single flipped digit between 01000001 (A) and 01100001 (a).
  • Choosing a notation. If your target wants two hex digits per byte instead of eight bits, ASCII to Hex produces the same values more compactly; binary is the better choice when the lesson or tool is explicitly about bits.
  • Encoding beyond ASCII. For accented or non-Latin text, the strict-ASCII rule here will stop you — that is the cue to use UTF-8 text-to-binary on the binary to text page instead.

Why 8 bits, and why strict ASCII

ASCII was standardised in 1963 as a 7-bit code: 128 positions covering the uppercase and lowercase Latin alphabet, digits, punctuation, and a set of control characters. Seven bits is all it needs. But because the byte settled at 8 bits, ASCII characters are stored and transmitted as full bytes with a leading zero, and that is what this converter emits — 01000001, not 1000001. Keeping the eighth bit makes the output line up on byte boundaries, which is exactly what a decoder expects.

The strict 0-127 rule is a deliberate boundary. The eighth bit being free is precisely what later encodings used to extend ASCII: Latin-1 puts accented characters in 128-255, and UTF-8 uses the top bit to mark multi-byte sequences. By refusing characters above 127, this tool guarantees a clean, unambiguous one-byte-per-character mapping — and tells you immediately when your text is not plain ASCII. When it is not, the binary to text converter's text direction handles the full UTF-8 range, where a single emoji legitimately spans four bytes.

Worked examples

Single character: A01000001

"A" is ASCII code 65. In binary that is 64 + 1 = 1000001, padded to eight bits as 01000001. The lowercase "a" is 97 (01100001) — the same byte with one extra bit set.

With punctuation and space: Hi!

Three characters: H is 72 (01001000), i is 105 (01101001), and "!" is 33 (00100001). Punctuation lives in the printable ASCII range and encodes exactly like letters, so the output is 01001000 01101001 00100001.

Separator off: continuous bitstream

Setting the separator to None turns "Hi" into 0100100001101001 — the same two bytes with no gap. That form is denser and is what the binary to ASCII decoder accepts as continuous input, as long as the total length stays a multiple of 8.

Common pitfalls

  • Non-ASCII characters. Accented letters (é, ü), CJK ideographs (中, 日), emoji, em-dashes, and smart quotes pasted from word processors all sit above code 127 and are rejected. The error names the character, its code, and its position.
  • Expecting UTF-8 output. This tool gives one byte per character. It will not produce the multi-byte UTF-8 encoding of, say, "é" — for that, encode via UTF-8 on the binary to text page.
  • Trailing whitespace. A space or newline at the end of your input is a real ASCII byte and will be encoded (space → 00100000). Trim it first if you do not want it in the output.
  • Confusing binary width with hex. Each ASCII character is 8 binary digits but only 2 hex digits. If your output looks "twice as long" as expected, you may have wanted ASCII to Hex instead.
  • Separator mismatch downstream. If the tool that consumes your binary expects no spaces, set the Separator to None before copying; a space-separated string pasted into a strict parser can be read as invalid characters.

Frequently asked questions

Why does my text with é, 中, or emoji fail?

Those characters have code points above 127, outside the 7-bit ASCII table this tool encodes. Each ASCII character is a single byte; characters beyond ASCII need multi-byte UTF-8, which this converter does not produce. For arbitrary text in any language, use the text-to-binary direction of the binary to text converter, which encodes UTF-8 (so one emoji becomes several bytes).

Can I choose how bytes are separated in the output?

Yes. Use the Separator control to put a space between each byte (the default, easiest to read), a newline (one byte per line), a comma, or no separator at all for a single continuous bitstream. The byte values are identical regardless of separator — only the formatting changes.

Why is every character exactly 8 bits?

ASCII only needs 7 bits to cover its 128 code points, but bytes are 8 bits on virtually every modern system, so each character is padded to a full byte with a leading zero. "A" (code 65) becomes 01000001, not 1000001. Fixing the width at 8 keeps byte boundaries unambiguous when the output is read back.

How long will the output be?

Eight bits per character, plus separators. A 10-character ASCII string becomes 80 bits — shown as ten space-separated bytes by default. There is no header or framing overhead; the length is purely 8 × the character count.

How is this different from ASCII to hex?

Both encode the same byte values, just in a different base. ASCII to binary writes each byte as 8 binary digits; ASCII to hex writes it as 2 hexadecimal digits. "A" is 01000001 in binary and 41 in hex — identical value, different notation. Pick whichever your downstream tool or lesson expects.

Does the converter keep spaces and punctuation?

Yes. A space is ASCII 32 (00100000), a comma is 44, an exclamation mark is 33 — all inside the printable ASCII range, so they encode just like letters. Only characters above 127 are rejected.