Skip to content
DailyToolbox
ConvertersFree · no sign-up

Number Base Converter

Decimal, binary, hexadecimal and octal, converted as you type.

Convert whole numbers between the four bases used most in computing. Type in any field and the other three update, with invalid digits rejected as you go.

Hexadecimal and octal output can be copied directly into code, colour values or memory addresses. The bit-length indicator shows how many binary digits the number needs.

Bit length: 8 bits
Bytes: 1
Hex padded: FF

Whole numbers only. Conversion uses JavaScript BigInt, so values larger than 9,007,199,254,740,991 stay exact. Negative numbers are not supported.

Private by design. Calculations run in your browser. Nothing you type is transmitted or stored.

How to use the number base converter

  1. 1

    Pick the base you have and type the number into its field.

  2. 2

    Only valid digits are accepted: 0–9 for decimal, 0–1 for binary, 0–7 for octal and 0–9 plus A–F for hexadecimal.

  3. 3

    Read the value in the other three bases.

  4. 4

    Use the copy buttons next to each field, or clear the form to start again.

Examples

Colour values

The decimal number 255 is FF in hexadecimal, 377 in octal and 11111111 in binary — the maximum value of one 8-bit colour channel.

Permissions

Unix file mode 755 in octal is 493 in decimal and 111101101 in binary, where each group of three bits is one permission set.

Frequently asked questions

Does the converter handle fractional numbers?

No. It converts whole numbers only, because fractional values in other bases are ambiguous to read and rarely needed. Use integers for bit masks, colours and addresses.

Why is hexadecimal used in computing?

Each hex digit maps to exactly four binary bits, so a byte is always two hex characters. That makes hex far shorter than binary while staying easy to convert mentally.

Is there a size limit?

Values are handled with JavaScript's arbitrary-precision BigInt type, so very large integers convert exactly. Inputs longer than a few hundred digits may be slow to render but remain accurate.

All tools