Binary, Decimal and Hex Converter
Type a number in any base and the other three update instantly: binary, decimal, hexadecimal and octal. Very large whole numbers are handled exactly. A second section converts IPv4 addresses between dotted decimal and binary octets, which is useful when learning subnetting or checking masks by hand. Everything is calculated in your browser.
Binary, Decimal and Hex Converter
Runs in your browser. Nothing you enter is uploaded or saved.
How to use this tool
- Pick a box. Type into the binary, decimal, hexadecimal or octal box.
- Read the conversions. The other boxes update as you type, and the binary is shown in groups of four.
- Convert an IP address. Type a dotted-decimal address or its binary octets to convert in either direction.
How place values work
In binary each place is a power of two: 128, 64, 32, 16, 8, 4, 2, 1 for one octet. 11000000 is 128 + 64 = 192. Hexadecimal uses powers of 16, and each hex digit maps to exactly four bits.
Why networking uses binary
Subnet masks and prefixes are about bits: a /26 mask is 26 ones followed by 6 zeros. Writing an address in binary octets makes it easy to see where the network part ends and the host part begins.
Where hex and octal appear
Hexadecimal is used for MAC addresses, IPv6, colours and memory addresses. Octal appears mainly in Unix file permissions, such as chmod 755.
Frequently asked questions
How do I convert decimal to binary by hand?
Divide by 2 repeatedly and write down the remainders, then read them from bottom to top. For an octet, subtracting place values from 128 down to 1 is often quicker.
Does it handle negative numbers or fractions?
No. It converts whole, non-negative numbers, which covers addressing and most programming uses.
Is there a size limit?
Inputs up to 4,096 digits are converted exactly using the browser’s big-integer support.