Conversion Tools

Binary Converter

Convert between binary, decimal, hexadecimal, octal, and text in one place - enter a value in any base and see every other representation instantly. Conversions are exact at any size, and the reference tables below show how the arithmetic works.

How decimal converts to binary

Divide by 2, write down the remainder, repeat with the quotient, then read the remainders from the bottom up. Converting 300 to binary:

StepDivisionQuotientRemainder (bit)
1300 ÷ 21500
2150 ÷ 2750
375 ÷ 2371
437 ÷ 2181
518 ÷ 290
69 ÷ 241
74 ÷ 220
82 ÷ 210
91 ÷ 201

Reading the remainder column bottom to top gives 100101100, so 300 in decimal is 100101100 in binary. Going the other way, multiply each bit by its place value and add: 1×256 + 0×128 + 0×64 + 1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 0×1 = 300.

Powers of two

Every binary place value is a power of two, which is why these numbers turn up constantly in memory sizes, colour depths, and address ranges.

ExponentDecimalHexBinary
2^010x11
2^120x210
2^240x4100
2^380x81000
2^4160x1010000
2^5320x20100000
2^6640x401000000
2^71280x8010000000
2^82560x100100000000
2^95120x2001000000000
2^101,0240x40010000000000
2^112,0480x800100000000000
2^124,0960x10001000000000000
2^138,1920x200010000000000000
2^1416,3840x4000100000000000000
2^1532,7680x80001000000000000000
2^1665,5360x1000010000000000000000
2^201,048,5760x1000001 followed by 20 zeros
2^2416,777,2160x10000001 followed by 24 zeros
2^324,294,967,2960x1000000001 followed by 32 zeros

ASCII reference

The table below covers the ASCII range, where each character is one byte. Switch the input base above to Text to convert a whole string at once: ASCII characters still take one byte each, but the tool encodes the full Unicode range as UTF-8, where a character can take one to four bytes (for example, é encodes as two bytes, C3 A9).

CharacterDecimalBinary (8-bit)Hex
A65010000010x41
B66010000100x42
C67010000110x43
M77010011010x4D
Z90010110100x5A
a97011000010x61
b98011000100x62
c99011000110x63
m109011011010x6D
z122011110100x7A
048001100000x30
553001101010x35
957001110010x39
space32001000000x20
!33001000010x21
?63001111110x3F

Why hex is shorter than binary

One hex digit covers exactly four bits, so hex is binary written four bits at a time - which is why memory addresses and colour codes use it. 1111 1111 is FF is 255. Octal works the same way with three bits per digit, which is why Unix file permissions read as three octal digits: 755 is 111 101 101.

What is binary?

Binary is base 2: it writes every number using only 0 and 1. Each position is worth twice the one to its right, so where decimal counts in ones, tens, and hundreds, binary counts in ones, twos, fours, and eights. Computers use it because a circuit only has to tell two states apart, off and on, rather than ten.

How to use this converter

  1. 1

    Type your value

    Enter the number or text you want to convert in the Input Value field.

  2. 2

    Pick the base you are starting from

    Set Input Base to match what you typed: Decimal, Binary, Octal, Hexadecimal, or Text.

  3. 3

    Read every other representation

    The results update as you type and show all the remaining bases at once, so you do not choose a target base.

  4. 4

    Copy what you need

    Copy the line you want straight from the results.

There is no target base to choose. Whatever you put in, the converter shows all the other representations at the same time.

Binary to decimal: 10110101

Give each bit its place value, then add the ones sitting above a 1.

Bit10110101
Place value1286432168421

Adding the highlighted values: 128 + 32 + 16 + 4 + 1 = 181. So binary 10110101 is 181 in decimal.

Binary to hexadecimal: 10110101 to B5

Hex is quicker than going through decimal, because one hex digit is exactly four bits. Split the byte into two groups of four and convert each on its own: 1011 is 8 + 2 + 1, which is 11, written B. Then 0101 is 4 + 1, which is 5. Put them back together and 10110101 is B5. Checking against the decimal above, B5 is 11 times 16 plus 5, which is 181.

Binary to text: reading bytes as ASCII

Text mode reads eight bits at a time and looks each byte up as a character. Take 01001000 01101001. The first byte is 64 + 8, which is 72, and 72 is the letter H. The second is 64 + 32 + 8 + 1, which is 105, the letter i. Together they spell Hi. Set Input Base to Binary and paste both bytes to see the same result.

Negative numbers: two’s complement

This converter takes non-negative values only, so negatives are worth understanding by hand. Computers store them in two’s complement: write the positive value, flip every bit, then add 1. For -5 in eight bits, +5 is 00000101, flipping every bit gives 11111010, and adding 1 gives 11111011.

Those same eight bits are 251 when read as an unsigned number, which is what this tool will show you if you enter them. Whether the byte means -5 or 251 depends entirely on which convention the program reading it uses, and nothing in the bits themselves records the choice.

Quick reference

Decimal 0 to 15 in binary and hex

These sixteen values are one hex digit, or one four-bit nibble, each.
DecimalBinaryHex
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F

Frequently asked questions

Related converters

Last reviewed: September 2026

How do you convert binary to decimal?

To convert binary to decimal, multiply each digit by its power of two and add the results: 1011 becomes 8 + 0 + 2 + 1 = 11. To convert text to binary instead, each character maps to its 8-bit code - "Hi" is 01001000 01101001 in ASCII.

How do you convert decimal to binary?

To convert decimal to binary, divide the number by 2 repeatedly and read the remainders bottom to top. For 11: 11÷2 = 5 r1, 5÷2 = 2 r1, 2÷2 = 1 r0, 1÷2 = 0 r1 - giving 1011. Every whole number has exactly one binary representation.

What is a binary translator?

A binary translator converts between binary code and readable text, mapping each 8-bit group to one character using ASCII or UTF-8. The binary 01001000 01101001 translates to "Hi". The same translation runs in reverse, turning typed text back into its binary representation.

Runs in your browser. Your files and text never leave your device - nothing is uploaded.