b2KIT

Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal bases.

How to Use Number Base Converter

  1. 1

    Enter a number

    Type the number you want to convert to another base.

  2. 2

    Select input base

    Choose binary, octal, decimal, hexadecimal, or custom base.

  3. 3

    View all bases

    See the number converted to multiple bases simultaneously.

Tested tool guide Tested browser tools Checked August 16, 2026

What Number Base Converter does, with a checked example

Number Base Converter rewrites a numeral among base 2 (binary), base 8 (octal), base 10 (decimal), and base 16 (hexadecimal). Identify the base in which the input is written; the tool interprets those digits by their positional weights and presents equivalent forms in the other supported bases. The frequent mistake is assuming a digit string has one universal value. It does not: 10 means two in binary, eight in octal, ten in decimal, and sixteen in hexadecimal.

Worked example

A concrete input and expected output from the current implementation.

Input

25, with decimal selected as the source base

Expected output

Binary: 11001
Octal: 31
Decimal: 25
Hexadecimal: 19

In binary, 11001 is 16 + 8 + 1. Octal 31 is 3 * 8 + 1, and hexadecimal 19 is 1 * 16 + 9, so every representation has the decimal value 25.

How the result is produced

1

Interpreting the source

The selected source base controls which digits are meaningful and what each position weighs. Starting at the right, positions represent successive powers of that base. Binary permits 0 and 1, octal permits 0 through 7, decimal permits 0 through 9, and hexadecimal adds A through F for values ten through fifteen. A digit outside the relevant alphabet cannot belong to that numeral.

2

Writing the equivalent numeral

Once the numeral's value is established, the converter rewrites it with the destination base's digit alphabet. Representation length can change considerably: one hexadecimal digit covers the same range as four binary digits. Letter case in hexadecimal does not change the value, so 2A and 2a denote the same number even if the displayed result consistently uses only one case.

Good uses

  • Check a binary flag or register value by translating it into decimal and hexadecimal forms that are easier to compare with technical documentation.
  • Convert a hexadecimal address, mask, or diagnostic log value into binary when you need to inspect individual bit positions.
  • Translate an octal permission-style value into decimal or binary while checking configuration data or explaining its numeric representation.

Limits and checks

  • A bare string is ambiguous without its source base. For example, 1010 represents decimal 10 in binary, 520 in octal, 1010 in decimal, and 4112 in hexadecimal.
  • Prefixes and separators such as 0b, 0x, underscores, commas, and embedded spaces are notation conventions rather than base digits. Confirm whether the input field accepts them before including them.
  • Base conversion preserves numeric value, not an intended field width or signed interpretation. Add required leading zeros separately, and do not treat a bit pattern as two's-complement data without knowing its width.

Common questions

Does 10 always mean decimal ten?

No. The source base gives the string its value. In binary, 10 equals decimal 2; in octal it equals 8; in decimal it equals 10; and in hexadecimal it equals 16. Select or label the source base before comparing results, especially when the numeral contains only 0 and 1 and therefore looks valid in every supported base.

Can this convert text or encoded bytes?

No. It changes the written radix of a number; it does not decide that a value is an ASCII character, Unicode code point, byte sequence, color, or machine instruction. You can convert a numeric code with it, but interpreting what that code means requires the relevant encoding or data-format rules.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools