Convert whole numbers between counting systems in a few clicks. Pick the bases, type a number, and see the answer right away, along with the number in every base the tool supports. All the math runs in your browser, so nothing you type is sent to our servers.

A number base converter is useful when you study computer science, read a hex color code, check a memory address, work with binary flags, or follow a programming tutorial that mixes number systems.

How to convert a number base

  • Pick your bases: choose the base you have in From and the base you want in To.
  • Enter a number: type the whole number you want to convert. Use only the digits allowed in the From base.
  • Use a quick pair: tap a common pair such as Dec to Hex to set both bases at once.
  • Swap if needed: press the swap button to reverse the direction in one click.
  • Copy the result: press Copy result to paste the answer into a message or document.

Supported bases

BaseDigits255 in this baseBest for
Binary (2)0 to 111111111Computer hardware and logic
Octal (8)0 to 7377Unix file permissions
Decimal (10)0 to 9255Everyday counting
Hexadecimal (16)0 to 9, A to FFFColors, memory addresses, and bytes
Base 320 to 9, A to V7VCompact codes and encodings
Base 360 to 9, A to Z73Short IDs and codes

Common base conversions

ConversionMethodExample
Decimal to binaryDivide by 2 and read the remainders from bottom to top13 = 1101
Binary to decimalAdd the place values of each 11101 = 8 + 4 + 1 = 13
Decimal to hexadecimalDivide by 16 and read the remainders from bottom to top, using A to F for 10 to 15255 = FF
Hexadecimal to decimalMultiply each digit by its power of 16 and add1A3 = 256 + 160 + 3 = 419
Hexadecimal to binaryWrite each hex digit as four binary digits3F = 0011 1111
Octal to decimalMultiply each digit by its power of 8 and add17 = 8 + 7 = 15

What this tool does and does not do

The tool converts whole numbers between bases from 2 to 36, using exact integer math, so very large values are not rounded. Negative numbers are shown with a minus sign. The optional prefixes 0b, 0o, and 0x are accepted when they match the From base, and letters are not case-sensitive. Results with letters are shown in capitals, such as FF. The tool does not accept fractions such as 3.5, and it does not show two's complement or fixed-width results, such as an 8-bit or 32-bit view of a negative number. Your number is not changed or stored.

Tips for better results

  • Check the digits: a digit that is too large for the From base, such as 9 in binary, will be flagged.
  • Use the full list: the list below the result shows your number in every supported base at once.
  • Keep the prefix in mind: 0x means hexadecimal and 0b means binary, so you can paste code values directly.
  • Swap to double-check: convert back with the swap button to confirm the answer looks right.
  • Remove separators: spaces and underscores are ignored, so 1111_0000 and 11110000 give the same result.
Converting number bases accurately helps you read code, debug low-level data, and understand how computers store information.

Common number base problems

  • The number is not accepted: it contains a digit that the From base does not allow. Check the digits or choose a larger base.
  • A decimal point is flagged: the tool converts whole numbers only. Remove the part after the point.
  • The result looks wrong: check that From and To are not reversed. Use the swap button to flip them.
  • A negative result looks odd: the minus sign is kept. Two's complement, which some programs use for negative numbers, is not shown.
  • A prefix is not removed: the prefix must match the From base, such as 0x for hexadecimal. A 0x prefix in a decimal field is treated as an error.

Frequently asked questions

What does a number base converter do?

A number base converter changes a whole number from one counting system to another, such as decimal to binary or hexadecimal to decimal.

Which number bases can I convert?

You can convert binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), base 32, and base 36. Negative whole numbers are supported too.

Is the number base converter free to use?

Yes. Xornex provides this number base converter free of charge, with no sign-up required.

Is the number I type sent to a server?

No. All calculations run in your browser, and the values you enter stay on your device.

How do hexadecimal digits work?

Hexadecimal uses the digits 0 to 9 and then A to F, where A is 10 and F is 15. Letters are not case-sensitive, so ff and FF give the same result.

Can I enter a prefix such as 0x or 0b?

Yes. A prefix that matches the From base, such as 0x for hexadecimal or 0b for binary, is removed before the conversion. Prefixes are optional.

Why does the tool only accept whole numbers?

Fractions such as 3.5 are not supported. Convert the whole part and the fraction separately if you need both.

Are very large numbers accurate?

Yes. The converter uses exact integer math, so long values such as 2 to the power of 100 are shown without rounding.

Share this article