How do I convert hex to decimal by hand?
Multiply each digit by a power of 16, starting with 16^0 on the right, and add the results. The letters A to F stand for 10 to 15. For 2F: 2 × 16 + 15 = 47.
Convert between hexadecimal, decimal, binary and octal. Type in any field and the other three update; works for non-negative whole numbers of any size.
If this tool isn’t working as expected, please take a screenshot of the error and report the problem here so we can investigate and improve it.
Four linked fields - hexadecimal, decimal (also called denary), binary and octal. Type a whole number in any of them and the other three update as you type, so hex to decimal, decimal to hex, hex to binary, binary to decimal and every other pairing use the same number base converter.
Conversion uses BigInt, so values beyond 64 bits stay exact, and a Bit Info panel shows how many bits and bytes the value needs.
Each hex digit stands for exactly four binary digits, which is why 0xFF is 11111111 and why memory addresses and color values are written in hex: it is binary in a compact form. Octal groups bits in threes and survives mostly in Unix file permissions, where chmod 755 is the octal form of rwxr-xr-x.
Enter a whole number in the hexadecimal, decimal, binary or octal field.
The other three fields update as you type, and Bit Info shows the bits and bytes needed.
Use the Copy button next to the base you need.
Clear any field to reset all four, or click a quick example.
Paste a memory address, register value or constant into the hex field to see the decimal and binary form.
Work the conversion yourself first, then enter the number to confirm it. The FAQs below show the manual methods.
Type 755 into the octal field and the binary field shows 111101101: owner 111, group 101, others 101.
Bit Info shows the minimum bits and bytes a value needs, which tells you whether it fits in a 16-bit, 32-bit or 64-bit field.
Hexadecimal
FFFFFFFFFFFFFFFFDecimal / Bit Info
Decimal: 18446744073709551615
Bits needed: 64
Bytes: 8Tools that convert through ordinary floating-point numbers round anything above 9,007,199,254,740,991 (2^53 - 1). This one uses BigInt, so the last digits are exact. Longer values convert the same way, limited only by your browser's memory.
Octal
755Binary / Hexadecimal / Decimal
Binary: 111101101
Hexadecimal: 1ED
Decimal: 493Each octal digit is three bits: 7 is 111, 5 is 101. Read as read, write and execute flags, that is the owner's rwx and the group's and others' r-x.
There's no minus sign, no fractions and no two's-complement view, so a negative value or a number with a decimal point can't be entered.
Binary, octal, decimal and hexadecimal. Other bases such as base 32 or base 36 aren't available.
To convert a list, enter the numbers one by one; there's no batch input.
Worked methods for converting by hand, and how typed prefixes are handled.
Multiply each digit by a power of 16, starting with 16^0 on the right, and add the results. The letters A to F stand for 10 to 15. For 2F: 2 × 16 + 15 = 47.
Multiply each digit by a power of 2, starting with 2^0 on the right, and add the ones that are set. For 101010: 32 + 8 + 2 = 42.
Divide by 2 for binary or 16 for hex, write down each remainder, and keep dividing the quotient until it reaches 0. Read the remainders from last to first. For 255 in hex: 255 ÷ 16 = 15 remainder 15, then 15 ÷ 16 = 0 remainder 15, so the digits read FF. For 42 in binary, the remainders read 101010.
Yes - each field accepts and ignores its own prefix: 0x in the hex field, 0b in the binary field, 0o in the octal field. Another base's prefix isn't stripped, so 0b1 typed into the hex field is the three hex digits 0, B and 1 (177 in decimal).
Leave your email so we can prioritize similar tools and updates.