Number Base Converter

Client-sideNo sign-upFree

Convert a number between binary, octal, decimal, and hexadecimal, all shown at once.

How this tool works

1

Select the input base

Choose Binary, Octal, Decimal, or Hexadecimal explicitly - it’s never guessed.

2

Enter your number

Only characters valid for the selected base are accepted.

3

All four bases update at once

Binary, octal, decimal, and hex representations appear together immediately.

4

Copy the one you need

Each result has its own copy button for grabbing exactly the format required.

Quick facts

Category
Converters
Best for
Converting a bitmask or color value between hex and binary
Decimal input
✓ Converted below
Binary (base 2)
11111111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
In-content slot

About this tool

Select which base your input number is written in - binary, octal, decimal, or hexadecimal - then see it instantly converted into all four representations, each with its own copy button. The base is chosen explicitly with a selector rather than guessed from the string’s format, since a value like "101" is ambiguous - it’s a valid number in every one of these bases, just meaning something different in each - so guessing would silently produce the wrong answer for exactly the inputs where it matters most. Input is validated against the selected base’s character set (binary allows only 0-1, octal only 0-7, hex allows 0-9 and A-F), so an invalid digit for the chosen base is caught immediately instead of being silently ignored or misparsed. Useful for working with bitmasks, color values, file permissions, or any place a value shows up in an unfamiliar base. Runs entirely client-side.

Why use this tool

No ambiguous guessing

The input base is selected explicitly, so a value like "101" is never misread as the wrong base.

All four bases together

See binary, octal, decimal, and hex at once instead of converting one pair at a time.

Per-base input validation

An invalid digit for the selected base is caught immediately, not silently truncated.

Useful for real dev tasks

Built for bitmasks, color values, and file permissions, not just abstract number conversion.

Frequently asked questions

Many valid numbers are ambiguous across bases - "101" is legitimate binary, octal, decimal, and even the start of a hex value, and each interpretation produces a completely different result. Guessing based on format (like assuming a "0x" prefix means hex) would fail silently on the far more common case of a bare number with no prefix, so an explicit selector is the only way to guarantee a correct conversion every time.

The input is checked against the selected base’s valid character set before conversion - for example, typing "9" while Binary is selected (which only allows 0 and 1) produces a specific error naming the invalid character and the base, rather than silently truncating the input or converting only part of it.

Explore more free tools

Formatters, converters, validators, and generators - all free and running entirely in your browser.

Browse more tools