Number Base Converter: Binary to Decimal, Hex and Octal

Convert between binary, octal, decimal, hexadecimal and any base.

Encoding & Conversion Free, no sign-up Runs in your browser

Number Base Converter tool

Common bases

8
Bits required
11111111
Grouped into bytes

Any base from 2 to 36

About the Number Base Converter

Number Base Converter shows the same number written in binary, octal, decimal and hexadecimal at the same time. Type into any of the four boxes and the other three update, so you never have to remember which direction you were converting in.

Below the four common bases, a custom converter handles any base from 2 to 36, using the digits 0 to 9 followed by the letters A to Z. That covers base 32 encodings and the occasional base 36 identifier, as well as the teaching cases like base 5 that come up in coursework.

Each box validates what you type against its own base, so a 2 in a binary field or a G in a hexadecimal field produces a clear message rather than a wrong answer. A panel underneath shows how many bits the value occupies and what it looks like grouped into bytes, which is the detail you usually want when the number came from a register, a permission mask or a colour value.

How to use the Number Base Converter

  1. Type into any boxBinary, octal, decimal or hexadecimal, whichever you have.
  2. Watch the others updateAll four stay in step as you type.
  3. Use the custom base boxes for anything elseAny base from 2 to 36, in either direction.
  4. Copy the value you needEach box has its own copy button.

Features

  • Binary, octal, decimal and hexadecimal updating together
  • Any base from 2 to 36 in the custom converter
  • Per-field validation with a clear message for invalid digits
  • Bit length and byte grouping of the current value
  • Handles large integers precisely rather than losing digits
  • Copy any representation in one click

Who uses this tool

The number base converter is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:

  • Reading a permission mask or a bit flag from a log
  • Converting a colour value between decimal and hexadecimal
  • Checking coursework on number systems
  • Working out a subnet mask or a port number in another base
  • Translating a hexadecimal constant from one language to another

Frequently asked questions

Why do programmers use hexadecimal so often?

Because one hexadecimal digit represents exactly four bits, so a byte is always two digits and the mapping to binary is immediate. Decimal has no such alignment, which is why memory addresses and colour values are almost always written in hex.

What is the largest number I can convert?

Very large values are handled precisely using big-integer arithmetic, so a sixty-digit number converts without losing its last digits, which is where simpler converters go wrong.

Can I convert negative numbers?

Yes, with a minus sign. Note that this is a plain negative value, not a two's complement representation, which is a different thing and depends on a fixed word size.

Does it handle fractions?

No. Conversion covers whole numbers. Fractional values in another base are a separate problem with its own rounding behaviour.

Why does base 36 stop at Z?

Because the digits are 0 to 9 followed by A to Z, which gives 36 symbols in total. Any higher base would need symbols that nobody agrees on.

What does the bit length tell me?

How many binary digits the value occupies, which is how you tell whether a number fits in 8, 16, 32 or 64 bits. The byte grouping underneath shows the same value split into groups of eight for easier reading.

If the number base converter is not quite what you need, these other free tools solve closely related problems.

Text to Binary Converter

Convert text to binary or hex byte values, and convert them back to text.

Encoding & Conversion Use tool

HEX to RGB Converter

Turn any HEX code into RGB and HSL values, with alpha support.

Color Tools Use tool

Base64 Encoder

Encode any text, including emoji and accents, to a Base64 string.

Encoding & Conversion Use tool

Hash Generator

Generate cryptographic hashes of text, computed in your browser.

Developer Tools Use tool

RGB to HEX Converter

Enter R, G and B values and get the matching HEX and HSL colour.

Color Tools Use tool