ab

ASCII to Binary

✓ Free & no signup 🔒 Runs 100% in your browser Updated 2026-11-25 Binary Converter Tools

Sometimes you already have the character codes, not the characters: a decimal byte list from a serial log, a code table from a textbook exercise, or byte values pulled from a debugger. This tool takes those decimal ASCII codes and converts each one into its 8-bit binary form, live as you type, entirely in your browser with no uploads and no signup required.

The input format is flexible. Codes can be separated by spaces or commas, so 72 101 108 108 111 and 72,101,108,108,111 both work, and line breaks between codes are fine too when you paste a column of numbers out of a spreadsheet. Empty input simply gives empty output; malformed entries, such as a code above 255 or a stray word, produce a clear error message that tells you which entry failed rather than quietly skipping it.

A quick example to show the shape of the output. The codes 72, 105, and 33 are capital H, lowercase i, and the exclamation mark. In binary they become 01001000, 01101001, and 00100001. Three codes in, three padded bytes out, always exactly 8 bits each, with leading zeros added so every group lines up.

What Are ASCII Codes and How Do They Map to Bits?

ASCII, the American Standard Code for Information Interchange, assigns each character a number from 0 to 127. The assignments were fixed in the 1960s and still shape every modern encoding: capital letters occupy 65 through 90, lowercase letters 97 through 122, digits 48 through 57, and punctuation fills the gaps. The space character is 32. A few anchor values worth memorizing are A as 65, a as 97, and 0 as 48, because the difference of exactly 32 between the letter cases, and exactly 48 between a digit character and its value, explains half of the classic ASCII tricks.

Technically, the values 128 to 255 were never part of standard ASCII; they belong to extensions like Latin-1 or to the high half of UTF-8 sequences. This tool accepts codes from 0 to 255 so it can also convert extended and UTF-8 continuation bytes, but codes above 127 will not display as recognizable English characters if you later decode them as plain ASCII. Codes 0 to 31 are control characters with no printed form; their binary is perfectly valid, but do not expect a visible letter when they round-trip.

How to Use This Tool (Step by Step)

  1. Paste your decimal codes into the input area, separated by spaces or commas, in the order the characters should appear.
  2. The binary output updates on every keystroke, one 8-bit group per code, separated by spaces for readability.
  3. Copy the result with one click for use in documentation, homework, or test fixtures.
  4. If any entry is not a whole number between 0 and 255, an error message names the offending value so you can fix it precisely.
  5. To recover text from the binary, use the binary-to-text tool, or for the characters directly from codes, the decimal-codes-to-text converter on this site.

Worked Examples

Codes (decimal)CharactersBinary output
83 84 79 80S T O P01010011 01010100 01001111 01010000
48 49 500 1 200110000 00110001 00110010
126, 94, 38~ ^ &01111110 01011110 00100110
13 10CR LF (line break)00001101 00001010

The last row is a favorite in embedded systems work: the two-byte sequence 13, 10, binary 00001101 00001010, is the classic CRLF line ending that terminates lines in Windows text files and many serial protocols. Recognizing it in binary form is a daily skill for anyone debugging device output.

How the Conversion Works Internally

Each decimal code is converted to base 2 by repeated division. Take 83: dividing by 2 repeatedly gives remainders that read bottom-up as 1010011, a 7-bit value. Because 83 is below 128, the natural binary is only 7 bits long, so the tool prepends a leading zero to produce the full byte 01010011. Every code from 0 to 255 fits in exactly 8 bits, and every output is padded to that width, which is what makes the stream unambiguous to decode later in groups of eight.

There is no arithmetic shortcut needed here, but a mental one exists for letters: code values between 64 and 95 start with 01, and values between 96 and 127 start with 011. So all capitals look like 010xxxxx and all lowercase like 011xxxxx. That single observation lets you spot a character's case in binary at a glance, a trick exam questions love to test.

Common Use Cases

  • Embedded and serial debugging: device logs often print byte values as decimal numbers; converting them to binary reveals the bit-level framing, start and stop bits, and status flags hiding inside ordinary-looking text.
  • Coursework and exams: digital logic and networking classes drill exactly this conversion, and checking hand-computed answers against a live converter takes seconds.
  • Test fixtures: when writing unit tests for parsers or codecs, hard-coded expected byte patterns in binary are clearer than decimal for reviewers who think in bits.
  • Protocol teaching: showing that 13 and 10 become CR and LF makes framing characters concrete for students who have only seen them as invisible line breaks.
  • Data archaeology: old databases and fixed-width exports store text as raw codes; converting the codes to binary is the first step toward identifying control characters that break modern importers.

ASCII Codes Versus Characters Vers UTF-8

Three converters on this site cover the same underlying bytes from different starting points. Text-to-binary starts from characters, this tool starts from decimal codes, and text-to-ASCII produces the codes themselves. All three use the same rule for values above 127: the tool treats codes 128 to 255 as raw bytes, which is useful when your source is a byte dump rather than a character list. For full international text, the correct mental model is that a character like é is represented in UTF-8 by two codes, 195 and 169; feeding that pair here yields the two bytes 11000011 and 10101001, exactly what a text-to-binary converter would produce for the same character.

Tips and Best Practices

  • Check the range first: a value like 300 or a negative number is always a transcription mistake; the error message will flag it before it pollutes your output.
  • Remember padding: codes below 64 would be 6 or 7 bits naturally, so never drop the leading zeros; the byte width is part of the format, not decoration.
  • Round-trip as proof: feed your binary output to the binary-to-text tool and confirm the characters match expectations, especially when control codes are present.
  • Keep separators consistent when hand-editing long lists; a missing comma merges two codes into one wrong value that the validator will catch.
  • Label control codes: when converting lists containing 9, 10, or 13, annotate them as tab, LF, and CR in your notes, since their binary looks ordinary but their meaning is structural.

Frequently Asked Questions

How do I convert ASCII codes to binary by hand?
Convert each decimal code to base 2 using repeated division by 2, writing the remainders in reverse order, then pad with leading zeros to 8 bits. For code 83, the remainders give 1010011, and adding one leading zero yields 01010011, the letter S. Repeat for every code and separate the bytes with spaces. Values below 64 always need two leading zeros, values 64 to 127 need one, and any value from 0 to 255 fits in exactly 8 bits, which is why the byte is the universal unit here.
What binary number is the ASCII code 72 for H?
01001000. Dividing 72 by 2 repeatedly and collecting the remainders gives 1001000, which is 7 bits, so one leading zero pads it to a full byte. You can verify by summing the bit weights: the set bits are at positions 64 and 8, and 64 plus 8 equals 72, which is capital H in the ASCII table. The same code appears in UTF-8 unchanged, so this binary is correct whether your target system speaks ASCII or modern UTF-8.
Can this tool handle codes above 127?
Yes, it accepts any whole number from 0 to 255 and converts it to an 8-bit byte. Codes 128 to 255 belong to extended character sets like Latin-1 or to the continuation bytes of multi-byte UTF-8 sequences, not to standard ASCII, so decoding them back as plain text may show accented letters or other extended characters rather than English. A useful example: the pair 195 and 169 is the UTF-8 encoding of é, and this tool happily converts it to 11000011 10101001, matching what any UTF-8-aware converter produces.
What is the difference between ASCII and UTF-8 binary?
For codes 0 to 127 there is no difference at all: UTF-8 was designed so every ASCII character keeps its exact single-byte value, so 01000001 is A in both. The difference starts above 127. In ASCII extensions, each byte was one character, while in UTF-8, bytes above 127 are pieces of multi-byte sequences: é uses two bytes, most Chinese characters three, emoji four. So a code list containing only values up to 127 converts identically under both systems, and only mixed lists reveal the distinction.
Why is my binary output 8 bits even for small numbers?
Because each output group represents one byte, and a byte is always 8 bits wide. Code 65 would naturally write as 1000001, only 7 bits, and code 32 as 100000, only 6, but both are padded with leading zeros to 01000001 and 00100000. The fixed width is functional, not cosmetic: it lets a decoder split any stream into bytes without separators, and it keeps bit positions aligned so flags within a byte stay at their assigned positions. Dropping leading zeros is the most common hand-conversion mistake.
Does converting ASCII codes to binary reveal anything private?
The conversion itself happens entirely inside your browser; nothing is transmitted, logged, or stored, so you can use it offline and with sensitive data like partial keys or internal log lines without exposure. Do keep in mind that ASCII codes and binary are trivially reversible encodings, not security: anyone with any converter can read back the original characters in seconds. The privacy guarantee covers transmission and storage, not confidentiality of the encoding, so treat the output as plaintext in disguise whenever you share it.

Related Tools