Skip to content

Binary, Hex & Decimal Converter

Type a number in any base and see it in binary, octal, decimal and hex at once.

–Bits needed
–Bytes needed
–Number of 1 bits

Type a number in the binary, octal, decimal or hexadecimal box and the other boxes update instantly. A fifth box converts to and from any base between 2 and 36. Numbers of any size work, because the converter uses exact big-integer arithmetic instead of floating point.

Prefixes such as 0x, 0b and 0o are accepted, spaces and underscores are ignored, and negative numbers can be entered with a minus sign. Binary output can be grouped in fours for readability, and the number of bits is shown.

How to use the Binary, Hex & Decimal Converter tool

  1. Type a number in any of the boxes, such as decimal 255.
  2. Read the same value in binary, octal and hex.
  3. Choose another base from 2 to 36 in the custom box if you need it.
  4. Copy any result.

Why use ToolOrca Binary, Hex & Decimal Converter

  • Binary, octal, decimal and hex together
  • Any base from 2 to 36
  • Unlimited size with exact arithmetic
  • Accepts 0x, 0b and 0o prefixes
  • Negative numbers
  • Digit grouping and bit count

How to convert binary to decimal

Each binary digit is worth a power of two, starting with 1 on the right: 1, 2, 4, 8, 16 and so on. Add the values of the digits that are 1. For 1011: 8 + 0 + 2 + 1 = 11.

To go from decimal to binary, divide by 2 repeatedly and write down the remainders from bottom to top. 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1, giving 1101.

Why programmers use hexadecimal

One hex digit (0–9, A–F) represents exactly four binary digits, so a byte is always two hex digits: 11111111 = FF = 255. That is why hex is used for colors (#FF8800), memory addresses, byte dumps and character codes.

Frequently asked questions

What is 255 in binary?

11111111, which is FF in hex and 377 in octal.

How are negative numbers shown?

With a minus sign, for example −10 is −1010 in binary. The converter does not use two's complement, which depends on a fixed bit width.

Can it convert fractions like 0.5?

No, it converts whole numbers (integers) only.

How do I convert text to binary?

Use the text to binary converter, which turns each character into bytes.