Skip to content

Binary, Decimal, Hex and Octal Converter

Type a number in binary, octal, decimal or hexadecimal and the other three update instantly. Large integers are exact, and negative numbers can be shown in two's complement at 8, 16, 32 or 64 bits.

Negative numbers

Group binary digits

Base 2 – digits 0 and 1

Base 8 – digits 0 to 7

Base 10 – digits 0 to 9

Base 16 – digits 0 to 9 and A to F

Binary length: 8 bits

How to use the binary converter

  1. Type a number in any of the four boxes: Binary, Octal, Decimal or Hexadecimal.
  2. Read the other three, which update as you type. Each box has its own copy button.
  3. Choose how to group binary digits: No grouping, Groups of 4 or Bytes (8).
  4. For negative numbers, choose Minus sign to write them with a leading minus, or Two's complement and a Bit width to see how a computer stores them.

Features

  • Four bases at once: binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16).
  • Exact big numbers with no rounding, however many digits you type.
  • Bit grouping in nibbles of 4 or bytes of 8 for easier reading.
  • Two's complement at 8, 16, 32 or 64 bits, with the signed range shown.
  • Clear errors that name the character that doesn't belong, such as a 2 in a binary number.
  • Binary length in bits, so you can see how much space a value needs.

Place values in each base

Every base works the same way; only the multiplier changes. In decimal, each place is worth ten times the one to its right. In binary it's two times, in octal eight times and in hexadecimal sixteen times, with the letters A to F standing for 10 to 15. So the same value, two hundred and fifty-five, is written 11111111 in binary, 377 in octal, 255 in decimal and FF in hex.

Two's complement at a glance

With 8 bits you can store 256 different patterns. Two's complement uses the top bit as a sign: patterns starting with 0 are 0 to 127, and patterns starting with 1 are −128 to −1. To negate a number by hand, flip every bit and add one. For example, 5 is 00000101; flipping gives 11111010, and adding one gives 11111011, which is −5. Type 11111011 in the Binary box with Two's complement and 8-bit selected to check it.

Where you'll need this

  • Programming: reading bit masks, flags and register values, and checking what a negative integer looks like in memory.
  • Networking: converting IP address octets and subnet masks, such as 255.255.255.0, where each 255 is 11111111.
  • Students: checking homework on number bases and binary arithmetic.
  • Web design: hex color codes like #6366F1 are three bytes, 99, 102 and 241 in decimal.

Why use Fileora's binary converter

It converts all four bases together, never rounds large numbers, and explains mistakes instead of just showing a blank result. It runs entirely in your browser and needs no sign-up.

For color codes, the color converter turns hex into RGB and HSL. To encode text rather than numbers, use the Base64 encoder and decoder.

Frequently asked questions

How do I convert binary to decimal?

Each binary digit is worth twice the one to its right, starting from 1. For 1011, add 8 + 0 + 2 + 1 to get 11. With this tool you just type 1011 in the Binary box and the Decimal box shows 11.

How do I convert decimal to binary by hand?

Divide by 2 repeatedly and write down the remainders, then read them from the last to the first. For 13: 13 ÷ 2 is 6 remainder 1, 6 ÷ 2 is 3 remainder 0, 3 ÷ 2 is 1 remainder 1, and 1 ÷ 2 is 0 remainder 1. Reading upward gives 1101.

Why is hexadecimal used so much?

One hex digit stands for exactly four bits, so a byte is always two hex digits. That makes long binary values much shorter to read and write: 11111111 is FF and 1010 0101 is A5. Colors in web design, memory addresses and file checksums are all written in hex for this reason.

What is two's complement?

It is how computers store negative whole numbers. At a fixed width such as 8 bits, a negative number is stored as 2 to the power of the width plus the number, so −1 becomes 11111111 and −128 becomes 10000000. Choose Two's complement under Negative numbers, pick a bit width, and the tool shows the pattern in binary, octal and hex.

What happens if my number doesn't fit the bit width?

In two's complement mode, an 8-bit number must be between −128 and 127, a 16-bit number between −32,768 and 32,767, and so on. The tool shows the range under the width buttons and gives an error if a decimal number is outside it, or if a binary, octal or hex pattern has more bits than the width.

Is there a limit to how big a number can be?

Not in practice. The converter uses arbitrary-precision integers, so a 30-digit decimal number or a 256-bit hash value converts exactly, without the rounding you get in a spreadsheet or a basic calculator.

Can I paste values with 0x or 0b prefixes?

Yes. 0b in the Binary box, 0o in the Octal box and 0x in the Hexadecimal box are removed automatically. Spaces, underscores and apostrophes used as digit separators are ignored as well, so 1111_0000 and 1111 0000 both work.

Can't find the tool you need, or something isn't working?

Tell us which tool you'd like next or what went wrong. We read every message, and requests decide what we build next.

Opens your email app. Please don't attach private files.