Home/Tools/Converters/Number Base Converter

Number Base Converter

Converters

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

⚡ Instant🔒 Private, in your browser🆓 Free, no sign-up👥 For everyone
Your data never leaves your browser. We do not store inputs.

What Number Base Converter does

The Number Base Converter converts a number between binary, octal, decimal, hexadecimal, and other custom bases, updating every representation at once. It's free, runs entirely in your browser, and is a practical reference for programmers and students working with different number systems.

FV
Reviewed by the FreeToolsVerse team · Last updated · How we check our tools

Features and benefits

  • Shows binary, octal, decimal and hexadecimal together, plus one extra base of your choice from 2 to 36
  • Uses arbitrary-precision integers, so values beyond 64 bits convert exactly
  • Accepts 0x, 0b and 0o prefixes and ignores spaces, commas and underscores in the input
  • Names the first invalid digit when the input does not fit the chosen base

How to use Number Base Converter

  1. Enter a number and select its current base
  2. Binary, octal, decimal and hexadecimal are shown together; pick an extra output base (2-36) if you need one
  3. Results update instantly across all the shown bases
  4. Copy any of the converted values

Who should use it

Made for everyone. Typical uses:

  • Converting a hex color code or memory address into decimal for a programming task
  • Checking an octal file permission value, like chmod 755, against its decimal and binary equivalents
  • Converting between number bases for a computer science homework assignment

Example

The decimal number 255 is 1111 1111 in binary, 377 in octal, FF in hexadecimal and 73 in base 36. The octal permission 755 is 493 in decimal, 111 101 101 in binary and 1ED in hexadecimal.

Limitations and accuracy

It converts whole numbers only; fractions are not supported. Negative numbers keep a minus sign (-42 is -101010 in binary) and are not shown in two's complement, the form used inside computers.

Accuracy: Conversions use well-known methods and are tested with real sample inputs. Check the output before you send or publish it.

Expert Tip

For an 8-bit two's complement value, convert 256 minus the number: -42 becomes 214, which is 11010110 in binary.

Frequently asked questions

Which bases are supported?
Any base from 2 to 36 as the input, with binary, octal, decimal and hexadecimal always shown and one extra output base of your choice.
Is it free to use?
Yes, completely free.
Is my data uploaded anywhere?
No. The conversion runs locally in your browser.
Does it handle negative numbers?
Yes, with a minus sign: -42 is -101010 in binary and -2A in hexadecimal. This is the signed magnitude, not two's complement. For 8-bit two's complement, convert 256 minus the number instead.
Can it convert very large numbers?
Yes. It uses arbitrary-precision integers, so the largest unsigned 64-bit number, 18446744073709551615, converts exactly to FFFFFFFFFFFFFFFF.
Is there a simpler tool for just binary and decimal?
Yes, the Binary Decimal Converter is a more focused tool for just those two bases.

Number Base Converter: the complete guide

What the converter does

The Number Base Converter turns a whole number from one base into the others at once. You type a number, choose its input base from 2 to 36, and the tool shows the binary, octal, decimal and hexadecimal forms together with one extra base of your choice. Digits can be grouped for readability, and every row has a copy button. Spaces, commas and underscores in the input are ignored, letters can be upper or lower case, and the prefixes 0x, 0b and 0o are accepted when they match the base you selected.

Worked examples

These results come from the same functions the tool uses.

  • 255 in decimal is 1111 1111 in binary, 377 in octal, FF in hexadecimal and 73 in base 36.
  • 1010 in binary is 10 in decimal, 12 in octal and A in hexadecimal.
  • ff in hexadecimal is 255 in decimal, so a hex colour channel of ff is the maximum brightness of 255.
  • 777 in octal is 511 in decimal, 1FF in hexadecimal and 1 1111 1111 in binary: the permission bits of chmod 777.
  • zz in base 36 is 1,295 in decimal, the largest value two digits can hold in that base.

How the conversion works

Each digit in a number is worth the base raised to its position. In hexadecimal, FF means 15 × 16 + 15 = 255. Going the other way, you divide repeatedly by the target base and read the remainders upward. Binary and hexadecimal fit together neatly, because one hex digit is exactly four binary digits: F is 1111, so FF is 1111 1111. Octal groups bits in threes, which is why a Unix permission such as 755 is easy to read as 111 101 101 and equals 493 in decimal, or 1ED in hexadecimal.

Where programmers use it

Hexadecimal appears in colour codes, memory addresses, byte values and hashes. Octal is the notation of Unix file permissions. Binary is used for flags and bit masks, and base 36, which uses all ten digits and all 26 letters, is a compact way to write short identifiers. A colour such as #3b82f6 is three hex bytes, 59, 130 and 246 in decimal, and you can see the colour itself in the Color Converter. For text rather than numbers, the Hex to Text Converter and the Base64 Encoder / Decoder work on the characters themselves.

Large and negative numbers

The tool uses arbitrary-precision integers, so very large values convert exactly. The largest unsigned 64-bit number, 18446744073709551615, becomes FFFFFFFFFFFFFFFF in hexadecimal and a 64-digit binary string. Negative numbers are handled with a minus sign, so -42 is -101010 in binary, -52 in octal and -2A in hexadecimal. That is the signed magnitude, not the two's complement form used inside computers. To get two's complement for 8 bits, convert 256 - 42 = 214 instead, which is 11010110.

Errors and limits

If a character is not valid in the base you chose, the tool names it: typing 12 with binary selected returns the message that "2" is not a valid digit in base 2. Fractions are not supported, so a decimal point is rejected. For quick conversions between only binary and decimal, the Binary Decimal Converter is a more focused tool, and the Roman Numeral Converter handles another number system altogether.

Learning resources

Explore more in Converters, read the guides and articles, or see how we test our tools.

Share This Tool