---
slug: ascii-to-binary-converter
title: "ASCII to Binary Converter"
category: developer
updated: 2026-11-17
canonical: https://calcseed.com/c/developer/ascii-to-binary-converter/
html: /c/developer/ascii-to-binary-converter/
---

# ASCII to Binary Converter

Convert an ASCII character code (0–255) to its 8-bit binary and character. Free and instant.

## Formula

```text
N = b_7_×128 + b_6_×64 + b_5_×32 + b_4_×16 + b_3_×8 + b_2_×4 + b_1_×2 + b_0_×1
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| ASCII code point | number |  | 65 |

## Outputs

| Result | Format |
| --- | --- |
| Binary | primary |
| 8-bit binary | text |
| Character | text |

## How it works

### What this converter returns

You type an ASCII code point between 0 and 255 and the calculator returns two things: the fixed-width eight-bit pattern and the character that code stands for. The defaults are code point **65**, binary **01000001** and character **A**. Because the output is always eight characters long, every byte lines up in a column when you paste a block of them into an editor.

The conversion is pure place-value arithmetic — no encoding library, no locale, no text substitution. That makes it a reliable way to check what a byte actually contains before you send it to a device, a protocol parser or a serial port.

### How ASCII turns a character into a number

ASCII was standardised in 1963 as a seven-bit code, so its code points run from 0 to 127. Codes 0–31 are control characters that never print: 0 is NUL, 9 is tab, 10 is line feed, 13 is carriage return. Code 32 is the space, 48–57 are the digits, 65–90 the capital letters and 97–122 the lowercase letters. The remaining codes carry punctuation and a few symbols.

Codes 128–255 come from later eight-bit extensions such as ISO-8859-1, which is why the input range stops at 255. Those upper codes are not ASCII in the strict sense, but they fit in one byte and still round-trip through this conversion.

#### Two rules that explain everything else

Upper and lower case differ by exactly 32, so **A** is 65 and **a** is 97; in binary only bit 5 changes, from 01000001 to 01100001. Digits are contiguous too, so **0** is 48 and **9** is 57, and the numeric value of a digit character is its code minus 48.

### The formula behind the eight bits

The eight positions hold 128, 64, 32, 16, 8, 4, 2 and 1 from left to right. Each bit *b* is 1 when that weight is present in the code point and 0 when it is not. The calculator computes each bit as **(code >> i) & 1**, which isolates position *i* without any string handling.

Eight bits are used rather than seven because a byte is eight bits, and 2^8 gives 256 values — enough for the full 0–255 range. Padding to a fixed width is not cosmetic: without the leading zeros, 01000001 would render as 1000001 and you could no longer tell where one byte ends and the next begins.

### Worked example: code point 65

Start with the largest weight that fits. 128 is larger than 65, so bit 7 is 0. 64 fits once, leaving a remainder of 1, so bit 6 is 1. The next four weights (32, 16, 8, 4) are all larger than the remainder, so bits 5 to 2 are 0. The weight 1 fits exactly once, so bit 0 is 1. The pattern reads 01000001 and the sum checks out: 64 + 1 = 65.

- 128 does not fit &rarr; 0, remainder 65
- 64 fits once &rarr; 1, remainder 1
- 32, 16, 8 and 4 do not fit &rarr; 0 0 0 0
- 2 does not fit &rarr; 0, remainder 1
- 1 fits once &rarr; 1, remainder 0

Run the same number through repeated division as a cross-check. 65 ÷ 2 = 32 remainder 1, then 32 ÷ 2 = 16 remainder 0, 16 &rarr; 8 remainder 0, 8 &rarr; 4 remainder 0, 4 &rarr; 2 remainder 0, 2 &rarr; 1 remainder 0, 1 &rarr; 0 remainder 1. Reading the remainders upward gives 1000001, and one pad on the left makes 01000001.

### ASCII codes you will see most often

| Character | Decimal | Binary |
| --- | --- | --- |
| (space) | 32 | 00100000 |
| 0 | 48 | 00110000 |
| 9 | 57 | 00111001 |
| A | 65 | 01000001 |
| Z | 90 | 01011010 |
| a | 97 | 01100001 |
| z | 122 | 01111010 |
| ~ | 126 | 01111110 |
| (DEL) | 127 | 01111111 |
| (extended) | 255 | 11111111 |

Two patterns are worth memorising. The capital letter block starts at 64 + 1 and the lowercase block at 64 + 32 + 1, so the difference between **A** and **a** is a single bit. And everything below 32, plus 127, is unprintable — pasting those bytes into a terminal produces control sequences rather than characters.

#### Reading the same byte as hex

Split 01000001 into nibbles: 0100 is 4 and 0001 is 1, so the byte is 0x41, or 41 in hex. This is the value behind **%41** in a URL escape and behind the 0x41 you see in a hex dump. Every byte becomes exactly two hex digits, which is why hex is the usual shorthand for raw bytes.

### Where the conversion bites in practice

- Confusing a code point with its printed form: the character A and the number 65 are two views of the same byte, but the text 01000001 is eight separate bytes
- Forgetting the high codes: anything above 127 needs bit 7 set, so 200 is 11001000, not a seven-bit pattern
- Assuming every language fits: a Cyrillic or CJK character has no single-byte ASCII code and will not convert here
- Dropping the padding and then reading the stream as bytes, which shifts every following byte by one bit
- Treating the binary output as a number: 01000001 read as decimal digits is 1,000,001, not 65

The last point is the most common error. A bit string is a notation for a value, and a decimal parser that sees 01000001 will read it as ten million and one. If you need to move bytes between systems, send the value 65 as a single byte, or the string in a text field that is explicitly labelled binary.

#### When ASCII is not enough

UTF-8 keeps the first 128 code points identical to ASCII, so anything you convert here is valid UTF-8 as well. Above 127 the two diverge: in UTF-8, &eacute; is the two-byte sequence 0xC3 0xA9, which corresponds to code points 195 and 169 rather than the single Latin-1 value 233. If a byte stream shows pairs of values above 127, you are probably looking at UTF-8, not extended ASCII.

### Range limits and rounding

The input is rounded to a whole number and clamped to 0–255, so 65.4 becomes 65 and 300 becomes 255. There is no way to represent a negative code or a value above 255 in eight bits, which is exactly the constraint a byte imposes. Characters outside that range require a multi-byte encoding and a different tool.

One practical consequence: the character shown for codes 128–255 depends on the font and platform, not on the arithmetic. The binary output is always exact, but the glyph may render as a box or an accented letter depending on which eight-bit code page the system assumes.

## FAQ

### What is 65 in binary?

65 is 01000001. It equals 64 + 1, so bit 6 and bit 0 are set, and the other six bits are 0.

### Why is the binary output always eight digits?

A byte holds eight bits and 2^8 is 256, which covers every code point from 0 to 255. Fixed width keeps leading zeros visible so every code occupies exactly one byte.

### How do I convert a word like Hi to binary?

Convert each character separately: H is 72, or 01001000, and i is 105, or 01101001. Concatenated, the word is 01001000 01101001, sixteen bits or two bytes.

### Is ASCII the same as Unicode?

The first 128 Unicode code points are identical to ASCII, so plain English text converts the same way. Unicode continues past 127 with thousands of additional characters, and UTF-8 encodes those with two to four bytes.

### What does 127 mean in ASCII?

127 is DEL, the delete control character, written 01111111. It is the last of the seven-bit codes and the highest value defined in the original standard.

### Why do uppercase and lowercase letters differ by 32?

The letter blocks were laid out so that flipping bit 5 switches case. A is 65 (01000001) and a is 97 (01100001), a difference of 32, which is exactly the weight of bit 5.

### Can I convert a character above 255?

Not with this tool. Eight bits stop at 255, so a character like the euro sign, which is 0x20AC in Unicode, needs a multi-byte encoding rather than a single ASCII code.

### How many bytes is the text 01000001?

Eight bytes if you store it as text, because each of the eight characters is one byte, plus any terminator your environment adds. Stored as a byte value instead, the same information takes one byte.

### Why does my code page show a different character for 233?

233 is &eacute; in ISO-8859-1 but a different glyph in code page 437 or 1252. The binary 11101001 is fixed; the glyph depends on the character set the viewer assumes.

## Method and sources

Methodology: Conversions and formats follow the relevant IETF RFCs and IEEE standards, including RFC 4648 for Base64 and RFC 791 for IPv4 addressing.

Last updated: 2026-11-17.
- ASCII character encoding (7-bit standard, extended to 8 bits).
