Math

Base Converter

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

CALCULATOR

Enter your numbers

Instant results

THE NUMORIX GUIDE

How to use the Base Converter

Last reviewed September 14, 2026

What this calculator does

Parse the input string in the selected source base into an integer, then use positional conversion to express that integer in the selected destination base.

Formula and method

Parse the input string in the selected source base into an integer, then use positional conversion to express that integer in the selected destination base. The UI offers bases 2 through 36 even though its small preset list highlights 2, 8, 10, and 16.

Variables and inputs

Number defaults to 255, source base defaults to 10, and destination base defaults to 16. Digits must be valid for the source base.

Worked example

For 255 from base 10 to base 16: 255 / 16 = 15 remainder 15, so the digits are F and F; result = FF. The same decimal value is 11111111 in base 2 and 377 in base 8.

How to interpret the result

A base changes how a fixed integer is written; it does not change the integer's value.

Common mistakes to avoid

Do not treat hexadecimal A-F as decimal digits. Select the correct source base, and remember that leading zeros affect formatting but not value.

Assumptions and limitations

The engine uses parseInt and JavaScript Number, so malformed trailing characters may be ignored and very large integers can lose exactness. Negative and fractional values are not handled as general base representations.

Practical use and checks

The Base Converter changes how a nonnegative integer is written without changing its value. It is useful for reading binary flags, checking hexadecimal addresses, or explaining positional notation. Enter decimal 255 with source base 10 and destination base 16 as a check; the result should be FF. Changing the destination to base 2 should give 11111111, and base 8 should give 377. To verify a hexadecimal result, read FF as 15 x 16 plus 15, which equals 255. Select the source base from the characters actually used in the input. In base 16, A through F represent 10 through 15, while higher bases extend through additional letters. Leading zeros change presentation but not numeric value, so preserve them only when a fixed-width identifier requires them. The engine uses parseInt and JavaScript Number, which means malformed trailing characters may be tolerated and very large integers can lose exactness. Negative and fractional values are not general cases for this interface, even if a text field accepts them. This is a representation tool, not an encryption method: a converted identifier still carries the same information. For code, memory addresses, or checksums, also confirm the required width, signedness, endianness, and prefix convention outside the calculator.

Sources and references

COMMON QUESTIONS

Frequently asked questions

Why does FF equal 255?

F represents 15, so FF means 15*16 + 15 = 255 in positional notation.

Why are bases above 10 useful?

They compactly represent binary data and identifiers; hexadecimal is common because one hex digit corresponds to four binary bits.