Tools/Developer Tools/Number System Converter

Hex to Decimal Converter – Binary & Decimal to Hex

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.

About this tool

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.

How to Use Number System Converter

Type a Number

Enter a whole number in the hexadecimal, decimal, binary or octal field.

Read the Other Bases

The other three fields update as you type, and Bit Info shows the bits and bytes needed.

Copy a Value

Use the Copy button next to the base you need.

Start Again

Clear any field to reset all four, or click a quick example.

Common Workflows

Reading a hex value from a debugger or datasheet

Paste a memory address, register value or constant into the hex field to see the decimal and binary form.

Checking hand-worked homework

Work the conversion yourself first, then enter the number to confirm it. The FAQs below show the manual methods.

Working out chmod values

Type 755 into the octal field and the binary field shows 111101101: owner 111, group 101, others 101.

Choosing an integer size

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.

Examples

A value beyond floating-point precision

Hexadecimal

FFFFFFFFFFFFFFFF

Decimal / Bit Info

Decimal: 18446744073709551615
Bits needed: 64
Bytes: 8

Tools 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 to binary for file permissions

Octal

755

Binary / Hexadecimal / Decimal

Binary: 111101101
Hexadecimal: 1ED
Decimal: 493

Each 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.

Limitations

Non-negative whole numbers only

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.

Four bases

Binary, octal, decimal and hexadecimal. Other bases such as base 32 or base 36 aren't available.

One value at a time

To convert a list, enter the numbers one by one; there's no batch input.

FAQs

Worked methods for converting by hand, and how typed prefixes are handled.

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.

How do I convert binary to decimal by hand?

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.

How do I convert decimal to binary or hex by hand?

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.

Can I type a prefix like 0x, 0b or 0o?

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).

Get more tools like this

Leave your email so we can prioritize similar tools and updates.