A free binary converter for binary code, text, decimal numbers, hexadecimal and ASCII. Pick a direction, paste your input and the result appears as you type. Everything runs in your browser — no signup, no upload, no tracking.

Multi-mode binary converter

Mode:
Options:
0 / 100,000 chars

Try an example

Click any example to load it into the converter above and switch to the right mode.

What this binary converter does

Six conversion modes share one screen, so you can move between representations of the same data without switching tabs. Students use it to check homework on number bases, CTF players to decode bit strings, and developers to read the raw bytes behind a value. Each direction also has a dedicated page with more detail:

How binary numbers work

Binary is base 2: every position is worth twice the one to its right. An 8-bit byte has these place values, and a 1 in a position means "add this value".

Bit76543210
Value1286432168421
0100000101000001

In the example row only the 64 and 1 positions are on, so 01000001 = 64 + 1 = 65 — which is also the character code of the capital letter A. That single fact is the bridge between numbers and text: a text-to-binary conversion looks up each character's code and writes it in base 2.

Binary to decimal by hand

Write the place values over the bits and add up the ones that are switched on. For 10110101: 128 + 32 + 16 + 4 + 1 = 181. Leading zeros never change the value, so 00000101 and 101 are both 5.

Decimal to binary by hand

Divide by 2 repeatedly and keep the remainders, then read them from the bottom up. For 156:

156 ÷ 2 = 78  remainder 0
 78 ÷ 2 = 39  remainder 0
 39 ÷ 2 = 19  remainder 1
 19 ÷ 2 =  9  remainder 1
  9 ÷ 2 =  4  remainder 1
  4 ÷ 2 =  2  remainder 0
  2 ÷ 2 =  1  remainder 0
  1 ÷ 2 =  0  remainder 1
Read upward: 10011100  (128 + 16 + 8 + 4 = 156)

Binary and hex: the 4-bit shortcut

Hexadecimal (base 16) exists because it lines up perfectly with binary: one hex digit always equals four bits, so a byte is always two hex digits. Converting between them is just a table lookup — no arithmetic. 0xB5 is 1011 + 0101 = 10110101.

HexDecimalBinaryHexDecimalBinary
000000881000
110001991001
220010A101010
330011B111011
440100C121100
550101D131101
660110E141110
770111F151111

ASCII binary table: letters and digits

The 8-bit binary code for every English letter and digit. Uppercase letters start at 01000001 (65), lowercase at 01100001 (97) — the only difference is the bit worth 32, which is why flipping one bit changes the case. Digits start at 00110000 (48), so the last four bits of a digit's code are the digit itself.

Uppercase

A01000001
B01000010
C01000011
D01000100
E01000101
F01000110
G01000111
H01001000
I01001001
J01001010
K01001011
L01001100
M01001101
N01001110
O01001111
P01010000
Q01010001
R01010010
S01010011
T01010100
U01010101
V01010110
W01010111
X01011000
Y01011001
Z01011010

Lowercase

a01100001
b01100010
c01100011
d01100100
e01100101
f01100110
g01100111
h01101000
i01101001
j01101010
k01101011
l01101100
m01101101
n01101110
o01101111
p01110000
q01110001
r01110010
s01110011
t01110100
u01110101
v01110110
w01110111
x01111000
y01111001
z01111010

Digits

000110000
100110001
200110010
300110011
400110100
500110101
600110110
700110111
800111000
900111001

A space is 00100000 (32). Accented letters, other scripts and emoji are outside ASCII and take two to four bytes in UTF-8 — the translator handles those automatically.

Quick examples

TextBinary (UTF-8)
A01000001
Hi01001000 01101001
Hello01001000 01100101 01101100 01101100 01101111

How to use

  1. Pick a conversion mode from the buttons above (e.g. Text → Binary or Binary → Text).
  2. Type or paste your input into the Input box. You can also click Open file or drag a .txt file directly onto the input area.
  3. Adjust the Separator option if you want different output spacing (space, none, comma, or newline).
  4. The result appears instantly in the Output box. Click Copy to copy it to your clipboard, or Swap to reverse the conversion.

Frequently asked questions

How do I convert text to binary?

Type any text in the Input box. The tool converts each character to its 8-bit binary code (UTF-8 encoded) and displays the result instantly. Spaces separate bytes for readability.

How do I convert binary back to text?

Switch the mode to "Binary → Text", paste your binary code (with or without spaces). The tool groups bits into 8-bit bytes and decodes them as UTF-8 text.

Why do I see "Decoded bytes are not valid UTF-8"?

Your binary likely came from a different encoding (e.g., raw bytes, Latin-1) or is corrupted. Try Binary → Decimal or Binary → Hex to inspect the raw numbers instead.

How do I convert a decimal number to binary?

Switch to "Decimal → Binary" and type a non-negative integer (e.g. 255). The tool returns the unsigned base-2 form — 255 becomes 11111111. No leading zero padding is added.

Why does my decimal show as a huge string of 0s and 1s?

Each extra digit roughly triples the bit count, and the tool uses BigInt so there is no 53-bit precision ceiling. A 30-digit decimal legitimately produces a ~100-bit binary string — that is correct output, not a glitch.

Can I convert negative numbers?

Plain decimal → binary rejects negatives because raw binary has no sign. For signed values use the signed (two's complement) checkbox and pick a bit width (8, 16, 32, or 64) so the encoding is unambiguous.

How is hex (hexadecimal) related to binary?

Each hex digit maps to exactly 4 bits, so one byte is always two hex digits. That is why "Hex → Binary" expands 0xFF into 11111111 and 0xAB into 10101011 — direct 4-bit groupings with no math involved.

Can I paste hex with a 0x prefix?

Yes. The tool strips a leading 0x (case-insensitive) and ignores all whitespace before parsing, so "0xDEAD BEEF", "DEADBEEF", and "de ad be ef" all give the same binary output.

What is the maximum input length?

The tool accepts up to 100,000 characters per conversion. For larger batches, split your input or use the command-line equivalent.

Is my input sent to your servers?

No. All conversion happens entirely in your browser using JavaScript. We never see what you type, and no input is transmitted.