◈ nrtechstudio / tools all tools →
// bit.lab — text ⇄ binary

ASCII to Binary Converter

Type text, get 8-bit binary — or paste binary and get your text back. UTF-8 aware (é, 中, emoji encode correctly), with a per-character bit visualizer, spacing & MSB/LSB options. Free, no signup.

8-bit per byte UTF-8 multi-byte 100% client-side 0 uploads

⚠ Scope check — is this the right tool?

This tool = text ↔ binary encoding. It answers “what 0s and 1s represent this text?” — e.g. A → 01000001, and back.

Not this: an ASCII calculator does arithmetic on character codes (adding, comparing, or manipulating ASCII values) — a different job. Looking for character-code math instead? Search nrtechstudio.com for the ASCII calculator.

Also different: base64 (binary→text for transport), number base converters (the digit “1” ≠ the number 1 — see FAQ).

converter.engine

▸ Convert

Live conversion — type or paste and the result updates instantly.

Byte spacing
Bit order
Columns

bit.visualizer

▸ Per-character bit breakdown

Every character → its bytes → each byte as 8 bits with place values. Green = 1, dark = 0.

worked.examples

▸ Worked examples, step by step

Example 1 — “A” → binary, by hand

  1. Look up the ASCII code: A = 65.
  2. Convert 65 to binary by repeated division by 2, keeping remainders:
DivisionQuotientRemainder
65 ÷ 2321
32 ÷ 2160
16 ÷ 280
8 ÷ 240
4 ÷ 220
2 ÷ 210
1 ÷ 201
  1. Read remainders bottom → top: 1000001.
  2. Pad one leading zero to fill a byte: 01000001. ✓

Example 2 — “Hi” → binary

  1. H = ASCII 72. 72 = 64 + 8 → bits at 2⁶ and 2³ → 01001000.
  2. i = ASCII 105. 105 = 64 + 32 + 8 + 1 → 01101001.
  3. Join with a space: 01001000 01101001. ✓

Example 3 — binary → text (reverse)

  1. Split into 8-bit groups: 01001000 01101001.
  2. Group 1: 64 + 8 = 72 → ASCII table → H.
  3. Group 2: 64 + 32 + 8 + 1 = 105 → ASCII table → i.
  4. Result: Hi. ✓
methodology

▸ How the encoding works

ASCII: 7 bits in an 8-bit world

ASCII defines 128 characters (codes 0–127): English letters, digits, punctuation, and control codes. Because memory is byte-addressed, each code is stored in a full 8-bit byte with the top bit zero — that leading zero is why A (65) is 01000001, not 1000001.

UTF-8: how é, 中 and emoji become bytes

Everything beyond ASCII is encoded with UTF-8, using 1–4 bytes per character. This converter encodes them correctly — never silently truncated:

Code point rangeBytesByte patternExample
U+0000 – U+007F10xxxxxxxA → 01000001
U+0080 – U+07FF2110xxxxx 10xxxxxxé → 11000011 10101001
U+0800 – U+FFFF31110xxxx 10xxxxxx 10xxxxxx中 → 11100100 10111000 10101101
U+10000 – U+10FFFF411110xxx 10xxxxxx 10xxxxxx 10xxxxxx😀 → 11110000 10011111 10011000 10000000

Bit order & spacing

MSB-first (most significant bit first) is the standard: A = 01000001. LSB-first reverses the bits inside each byte (10000010) for serial-protocol work. Spacing only affects readability — 8-bit groups, 4-bit nibbles, or one continuous stream; the bits are identical.

Do it in code

Python: ' '.join(format(b, '08b') for b in 'Hi'.encode())
JavaScript: [...new TextEncoder().encode('Hi')].map(b => b.toString(2).padStart(8,'0')).join(' ')
Linux shell: echo -n Hi | xxd -b

reference.table

▸ ASCII → binary reference table

All 128 ASCII characters: decimal, hex, and 8-bit binary. Type to filter.

CharDecHex8-bit binary
faq

▸ Frequently asked questions

What is the letter "A" in binary?

The capital letter A has ASCII code 65, which is 01000001 in 8-bit binary. You get it by converting 65 to binary (1000001) and padding one leading zero to fill a full byte. The lowercase a is 97, or 01100001.

What is "Hi" in binary?

Hi in binary is 01001000 01101001. H is ASCII 72 → 01001000, and i is ASCII 105 → 01101001. Each character becomes one 8-bit group, joined with a space.

Why 8 bits and not 7 bits?

Classic ASCII is a 7-bit code (values 0–127), but every modern computer stores data in 8-bit bytes, so an ASCII character is shown with one leading zero to fill the byte. That is why A (65) is written as 01000001 instead of 1000001. The 8-bit form matches what you see in a hex editor or a network trace.

How do I convert text to binary by hand?

Take one character, look up its ASCII decimal code, then convert that decimal to binary by repeated division by 2. For A (65): 65÷2=32 r1, 32÷2=16 r0, 16÷2=8 r0, 8÷2=4 r0, 4÷2=2 r0, 2÷2=1 r0, 1÷2=0 r1. Read the remainders bottom-to-top: 1000001, then pad to 8 bits → 01000001. Repeat for every character.

How do I convert binary back to text?

Split the bits into 8-bit groups, convert each group to decimal, then look up the character in an ASCII table. Example: 01001000 → 64+8 = 72 → H; 01101001 → 64+32+8+1 = 105 → i. Together: Hi. The Binary → Text tab above does this automatically and accepts spaces, line breaks, 0b prefixes, and 0x hex bytes.

What about é, Chinese characters, and emoji — are they ASCII?

No. Standard ASCII only covers 128 characters (English letters, digits, punctuation). Characters like é, 中, and emoji live outside ASCII and are encoded with UTF-8, which uses multiple bytes per character. This converter handles them correctly: é becomes two bytes, 11000011 10101001, and 😀 becomes four bytes. Some simpler converters silently drop the extra bytes — this one does not.

Is the digit "1" the same as the number 1 in binary?

No — a common trap. The text character 1 has ASCII code 49, so it encodes as 00110001. The number 1 as a pure binary value is just 1. This tool encodes characters, so typing 123 gives 00110001 00110010 00110011, not 1111011.

MSB first or LSB first — which bit order should I use?

Use MSB-first (most significant bit first): it is the standard order used in ASCII tables, hex editors, and protocols, so A = 01000001. LSB-first reverses the bits inside each byte (A → 10000010) and is only needed for specific hardware or serial-protocol work. This tool defaults to MSB-first and labels the option clearly.

What is the difference between this and an ASCII calculator?

Different jobs. This tool converts text to and from binary encoding — it answers "what bits represent this text?" An ASCII calculator does arithmetic on character codes (for example adding or comparing ASCII values). If you want to see the 0s and 1s behind your text, you are in the right place.

Can I convert a whole file to binary?

Yes for text files: open the file in any text editor, copy the contents, and paste them here — the converter handles long inputs. Then use the Download button to save the binary as a .txt file. Binary files (images, executables) are not text and cannot be meaningfully converted this way.

How do I convert ASCII to binary in Python, C, or JavaScript?

Python: ' '.join(format(b, '08b') for b in 'Hi'.encode()). JavaScript: [...new TextEncoder().encode('Hi')].map(b => b.toString(2).padStart(8,'0')).join(' '). C: loop over the string and print each unsigned char with a bit mask. On Linux, echo -n Hi | xxd -b prints the same 8-bit groups.

How is this different from rapidtables' ASCII to binary converter?

RapidTables covers the basics, but this tool goes further: correct UTF-8 multi-byte encoding (é, CJK, emoji become the right bytes instead of being mangled), a per-character bit visualizer with decimal and hex columns, 4-bit nibble grouping, an MSB/LSB bit-order option, auto-detecting binary-to-text decode (0b/0x prefixes accepted), worked step-by-step examples, and a full 128-character reference table — all client-side with nothing uploaded.

Is my text sent to a server?

No. The conversion runs entirely in your browser with JavaScript — your text never leaves your device. There is no account, no upload, and no tracking of what you convert. You can even disconnect from the internet after the page loads and it keeps working.

What are 6-bit ASCII and extended ASCII?

Historical variants. 6-bit codes (like DEC SIXBIT) packed uppercase-only text into fewer bits on old mainframes, and "extended ASCII" usually means 8-bit code pages (like Latin-1 or Windows-1252) that reuse bytes 128–255 for accented characters. Neither is standard ASCII. This tool uses standard 7-bit ASCII plus UTF-8 for everything beyond it, which is what the modern web uses.

🔒 Privacy: this converter runs 100% in your browser. Your text is never uploaded, stored, or sent to any server — there is no backend at all. It keeps working even if you disconnect from the internet after the page loads.

Free tool by NRTechStudio