Guide

How to Convert a Number from One Base to Another

Enter a whole-number value, its source base, and a target base from 2 through 36. The converter returns the value in the target base along with decimal, binary, octal, and hexadecimal representations.

Tool Number Base Converter

What the number base converter does

Use the Number Base Converter when a whole-number value is written in one positional base and you need its representation in another. This is useful for moving between binary, octal, decimal, hexadecimal, and other bases from 2 through 36 without doing the place-value work by hand.

The tool uses three inputs: the value, its source base, and the target base. For example, you can enter a binary value with source base 2 and choose hexadecimal as the target. Alphabetic digits are accepted without case sensitivity, while alphabetic digits in the output use uppercase letters. Signed integers, including negative values, are handled by the conversion logic.

How to convert a number between bases

  1. Enter the whole-number value in the value field. Write it using digits that belong to the selected source base. Do not use fractional notation or floating-point notation.

  2. Enter the source base as an integer from 2 through 36. Base 2 is binary, base 8 is octal, base 10 is decimal, and base 16 is hexadecimal. You can enter numeric text; values that can be interpreted as integers are coerced before the range check. For reliable results, enter a whole-number base directly rather than relying on coercion.

  3. Enter the target base, also from 2 through 36. Check that both bases are valid before converting. If either base cannot be interpreted as an integer or falls outside this range, the conversion does not produce a successful result.

  4. Run the conversion. If the source value is valid for the source base, review the converted representation and the accompanying decimal, binary, octal, and hexadecimal representations.

  5. If you leave the source and target base fields empty, the effective defaults are decimal as the source and binary as the target. Supplying the bases yourself makes the intended conversion easier to check.

How to read the result

Read the converted representation as the value written in your selected target base. The additional decimal, binary, octal, and hexadecimal representations provide alternate forms for checking or reusing the result. Output letters appear in uppercase, so a hexadecimal result may contain A through F even when the input used lowercase letters.

An unsuccessful result usually points to an input problem rather than a different numeric meaning. Check that the value is an integer, that every digit is allowed by the source base, and that both base entries resolve to integers from 2 through 36. A negative sign is supported for signed integer values, but fractional values are outside this converter's reviewed capability.

The converter is for positional-base representations of whole numbers. It should not be treated as a parser for arbitrary numeric formats or as a way to convert values with a fractional component.

Worked example

A student has a binary whole number and wants to inspect its hexadecimal form before adding it to a programming exercise.

Enter 101101 as the value, choose 2 as the source base and 16 as the target base, then run the conversion and inspect the returned fields.

The result contains a converted representation in the target base, followed by corresponding decimal, binary, octal, and hexadecimal representations.

Limitations

  • The reviewed capability is limited to whole-number input. Fractional values, floating-point notation, and numeric formats outside integer parsing are not supported.
  • Source and target bases must resolve to integers from 2 through 36. Non-coercible or out-of-range base entries do not produce a successful conversion.

Common errors

  • A frequent input mistake is pairing a value with an invalid digit or entering a source or target base outside 2 through 36. Correct the digit for the chosen source base, then enter integer base values within the supported range and run the conversion again.

FAQ

Can I convert a negative number?

Yes, negative whole-number values are handled by the conversion logic. Fractional values are not within the reviewed capability.

How do I convert binary to hexadecimal?

Use source base 2 and target base 16, then enter the binary value using digits valid for base 2. The result includes the hexadecimal representation and other standard-base forms.

What happens if I leave the base fields empty?

If both base fields are omitted or empty, the effective source base is 10 and the target base is 2. Entering both bases yourself helps prevent an unintended conversion.

Tool

Number Base Converter