Skip to content

Binary Converter

Convert binary to decimal, hex and octal.

Binary
Output

No result

About Binary Converter

Binary Converter reads a string of ones and zeroes as a binary number and reports its value in decimal, hexadecimal and octal at the same time. Enter 11111111 and it returns 255 in decimal, ff in hex and 377 in octal — three views of the same quantity, which helps when you are cross-checking a value between a bit mask, a hex register dump and a code literal.

The input must be strictly binary: only the characters 0 and 1, with no prefix and no separators. Anything else is rejected with an invalid-binary message rather than silently coerced, which is the behaviour you want, because a stray character in a bit pattern usually signals a copy-paste error worth catching.

The two non-decimal outputs are lowercase and unpadded, so a small value shows a single digit rather than the eight or sixteen you might see in a register listing. If you need a fixed width, add the leading zeros yourself after converting.

The direction is fixed: this reads a binary string and reports other bases from it. There is no way to go the other way from the same page, so converting a decimal or hexadecimal value back into bits means reaching for a different tool. Nor is there any control over how the answer is presented — no fixed-width or zero-padded mode, no uppercase hex, no byte grouping, and no binary-coded or two's-complement interpretation for signed values. Separators are not permitted in the input either, so a bit pattern that arrived grouped into nibbles or bytes has to be joined up before it will be accepted, and there is no running byte count or field-width readout to check the input against.

How to use Binary Converter

  1. 1 Type or paste the binary number using only the digits 0 and 1.
  2. 2 Run the tool to see the same value in decimal, hexadecimal and octal.
  3. 3 Copy whichever representation your context needs, padding with leading zeros if a fixed width is required.

Frequently asked questions

Why was my input rejected as invalid?

Because it contained something other than 0 or 1. The tool expects a pure binary string with no 0b prefix and no spaces or separators, so any other character is treated as an error rather than ignored.

Is there a limit on the length?

There is no explicit cap, but very long strings exceed the precision JavaScript can hold as a number, and the decimal result loses accuracy beyond that point. For long bit patterns, read the hexadecimal output instead.

Why is the hexadecimal output lowercase and short?

The conversion uses standard number formatting, which uses lowercase letters and no leading zeros, so a value like 15 appears as f. Pad it yourself when your context expects a fixed two-digit byte.

Can it convert in the other direction?

No — it reads binary and reports decimal, hex and octal. Going from decimal or hex back to binary needs a different conversion tool.

Free, online, and private

Free to use

Binary Converter is completely free. There is no account to create, no login, and no hidden charge or usage limit.

Runs online in your browser

It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.

Your data stays private

All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.

How Binary Converter behaves in detail

These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.

Parameter Value
Accepted characters only 0 and 1 — the input is trimmed and then tested against /^[01]+$/
Output rows three lines: Decimal, Hex and Octal
Hex and octal form lowercase digits with no 0x, 0o or 0b prefix
Default input 11111111, which returns Decimal: 255 / Hex: ff / Octal: 377
Invalid input the single line Invalid binary, with no partial conversion

Compiled from the implementation of this tool and checked against it by itoolnet.

What Binary Converter does not do

Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.

  • Only 53 bits survive exactly. The digit string goes through parseInt and then Number.prototype.toString, both of which work in floating point, so 64 ones are printed as 18446744073709552000 instead of ...1615 — the tail of a 64-bit value is silently wrong.
  • The conversion runs one way only. There is no decimal, hex or octal field to type into, so turning 255 back into binary has to happen elsewhere, and there is no two's-complement form for the negative values that signed hardware works with.
  • Anything other than 0 and 1 fails outright: "1010 1010" with a space, "1010_1010", a 0b prefix and a cleared box all return Invalid binary rather than being cleaned up first, so separators have to be removed before pasting.

Tested and documented by itoolnet, the team that builds and maintains this site.

Share & embed this tool

Writing a guide or article? You are welcome to link to Binary Converter with the snippet below. It is free, runs entirely in your browser, and needs no signup.