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.

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

Conversion problems people bring here

What is 0x4000 in decimal?

16,384. The 0x prefix marks hexadecimal, and the converter switches to hex when it sees it, whatever the Input Base says. 4000 in hex is 4 x 16 cubed: 4 x 4,096 = 16,384. You also get the binary (100000000000000), the octal (40000) and, for inputs up to 16 digits, the place-value working step by step.

Why does my binary not turn into text?

A Text row appears only when the binary splits into whole 8-bit bytes and those bytes are valid UTF-8 without hidden control characters. Check that the length is a multiple of 8; spaces between bytes are fine. Text also comes only from binary or hexadecimal input, not decimal or octal. To turn text into binary, choose Text as the input base and type the words.

Can I convert negative numbers or decimals?

No. The converter accepts whole numbers of zero and above, at any size, and rejects a minus sign or a decimal point rather than guessing. Negative numbers in binary depend on a fixed bit width and two's complement: invert every bit of the positive value and add one. For 8 bits, -5 is 11111011. The guide below works an example by hand.

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.

The Tools Kit’s free binary converter turns binary into decimal, hexadecimal, octal, and text (and back) in your browser, so you can check any value without working it out by hand. If you then need a decimal result written out in words, the Number to Words converter does that.

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. For binary, octal or hex input, open "Show the working" to see the place-value steps.

  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.

Octal and hexadecimal explained

Octal (base 8) and hexadecimal (base 16) exist because they are shorthand for binary. Eight is 2 cubed, so one octal digit stands for exactly three bits. Sixteen is 2 to the fourth, so one hex digit stands for exactly four bits, and hex uses the letters A to F for the values 10 to 15. Converting between them and binary never needs any arithmetic beyond a single digit at a time.

To get octal from 10110101, group the bits in threes from the right, padding the left with a zero: 010 110 101 is 2, 6, 5, so the octal value is 265. Checking: 2 × 64 + 6 × 8 + 5 is 128 + 48 + 5, which is 181. Hex is the same idea with groups of four, which is why a byte is always exactly two hex digits.

You will meet hex in color codes, memory addresses, and byte dumps, and octal mainly in Unix file permissions, where each digit packs the read, write, and execute bits for one class of user. The Chmod Calculator spells those octal digits out as permissions. Network masks are binary underneath too: a /24 prefix in the CIDR Calculator is 24 one-bits, which is 255.255.255.0.

Worked conversions, step by step

Hex 7E4 to decimal. The place values in hex are 1, 16, 256, 4096, multiplying by 16 each time. So 7E4 is 7 × 256 + 14 × 16 + 4 × 1, which is 1792 + 224 + 4 = 2020. For binary, swap each hex digit for its four bits: 0111 1110 0100, and drop the leading zero to get 11111100100.

Decimal 2020 to hex. Divide by 16 and keep the remainders: 2020 ÷ 16 is 126 remainder 4, 126 ÷ 16 is 7 remainder 14 (E), and 7 ÷ 16 is 0 remainder 7. Reading the remainders from the last one up gives 7E4, which matches the example above.

Octal 755 to decimal. Octal place values are 1, 8, 64, 512. So 755 is 7 × 64 + 5 × 8 + 5, which is 448 + 40 + 5 = 493. In binary each digit becomes three bits, 111 101 101, and regrouping those nine bits into fours from the right gives 1 1110 1101, which is 1ED in hex. Enter any of these values in the converter with the matching Input Base and the other rows will show the same results.

Binary to text: reading bytes as ASCII

When Input Base is Binary, the converter also splits the bits into bytes of eight and, if they spell out readable text, adds a Text row. 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. The ASCII Converter lists these character codes on their own if you only need to look one up.

Text to binary through UTF-8

Choose Text (ASCII / UTF-8) as the Input Base and the converter encodes what you type as UTF-8, then shows every byte in binary, hex, decimal, and octal, separated by spaces. Plain ASCII characters are one byte each, so A comes out as 01000001, hex 41, decimal 65, octal 101.

Characters beyond ASCII take more than one byte. The letter é is two bytes, C3 A9 in hex, which is 11000011 10101001 in binary, 195 169 in decimal, and 303 251 in octal. Most emoji are four bytes. That is why a short message can produce far more binary than its letter count suggests, and why the byte count, not the character count, is what matters for storage limits (the Data Storage Converter scales bytes up to KB and MB).

The decoding works in reverse from hex as well. With Input Base set to Hexadecimal, C3 A9 shows a Text row of é, alongside the same digits read as a single number: 50089 in decimal. To carry those bytes through an email or a URL as plain characters instead, the Base64 Encoder is the usual next step.

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 10, 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.

Guides for Binary Converter