Skip to content
Free developer tool

Integer base converter

This base converter changes a whole number from one number base to another, such as hexadecimal ff to decimal 255. Programmers and students use it for binary, octal, decimal and hex work, and for bases up to 36 that use letters as digits.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result

Your input

6 characters

2 to 36
2 to 36
Letters

Result

Decimal (base 10)12648430
Hexadecimal (base 16)
c0ffee
Binary (base 2)
110000001111111111101110
Octal (base 8)
60177756
Input
c0ffee in base 16

The short answer

To convert a number between bases, write it in the target base using that base's digits. Hexadecimal uses 0 to 9 and a to f, binary uses 0 and 1, and octal uses 0 to 7. Every digit is worth the base raised to its position, counted from the right starting at 0.

FormulaValue = sum of digit x base^position, positions counted from the right starting at 0

Worked exampleHexadecimal c0ffee equals decimal 12648430, binary 110000001111111111101110 and octal 60177756.

Example

Input
c0ffee
Result
Decimal (base 10)12648430
Hexadecimal (base 16)
c0ffee
Binary (base 2)
110000001111111111101110
Octal (base 8)
60177756
Input
c0ffee in base 16

How to use the integer base converter

  1. Type a whole number such as ff or -1010 into the Whole number box.
  2. Set From base and To base, each 2 to 36. The defaults are 16 and 10.
  3. Set Letters to Lowercase or Uppercase.
  4. Read the converted number at the top, with decimal, hex, binary and octal below. Press Copy result or Download.

How it works

Numbers are handled as exact big integers, so long values convert without rounding. Up to 4096 digits are accepted.

A leading + or - sign is allowed, and negative results keep their minus sign.

A 0x prefix is accepted only when the input base is 16, 0o only for base 8, and 0b only for base 2.

Fractions, decimal points, spaces and underscores are rejected, as is any digit too large for the input base, such as 2 in binary.

Letters a to z stand for digit values 10 to 35, and input letters can be in either case.

Everything runs in your browser. Your input is not uploaded or stored. If you use Copy link, what you entered is placed in the link.

Questions and answers

How do I convert hex to decimal?

Leave From base at 16 and To base at 10 and type the hex value. The decimal number appears at the top.

Does it support negative numbers?

Yes. Type a minus sign in front. The result is shown with a minus sign, not as two's complement bits.

Can I convert decimals or fractions?

No. This tool converts whole numbers only and rejects a decimal point.

Why would anyone use base 36?

Base 36 uses all ten digits and all 26 letters, so it writes large numbers in few characters. It is sometimes used for short IDs.

Last updated November 1, 2026. Maintained by SnowRock. How our tools work

All 220 SnowRock tools