Skip to content
DoItJag

Number Base Converter

Convert a number between binary, octal, decimal, hexadecimal and other bases. Large numbers are converted exactly.

Binary (base 2)
1111 1111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
Base 36
73

About Number Base Converter

Number Base Converter takes a whole number written in binary, octal, decimal or hexadecimal and shows it in all four at once, plus one extra base of your choice between 2 and 36. It uses exact big-integer arithmetic, so even a number hundreds of digits long converts without rounding.

Programmers reading colour codes or addresses, electronics students learning binary, and anyone decoding a hex value from a log need this often.

When to use it

  • A colour channel in a CSS hex colour is C8 and you want its decimal value.
  • You need to set bit flags and want to see a decimal value as binary.
  • A log file or debugger shows an error code in hex.

Worked example

Choose Hexadecimal (base 16) in “It is written in” and enter 0xDEAD_BEEF. The prefix and underscore are ignored, and the tool shows:

  • Binary: 1101 1110 1010 1101 1011 1110 1110 1111
  • Octal: 33653337357
  • Decimal: 3735928559
  • Hexadecimal: DEADBEEF
  • Base 36 (the default extra base): 1ps9wxb

Good to know

  • Input can be in base 2, 8, 10 or 16. The extra output base can be anything from 2 to 36, using digits 0-9 then letters a-z.
  • The prefixes 0b, 0o and 0x are stripped only when they match the base you selected. Spaces and underscores anywhere in the number are ignored.
  • Letters are not case-sensitive on input. Hexadecimal output is upper case; the extra base is shown in lower case.
  • Binary output is grouped into blocks of 4 digits from the right to make it easier to read.
  • Negative numbers are shown with a minus sign, for example binary -1010 is decimal -10. This is not two’s complement, so it will not match the bit pattern a computer uses for a signed type.
  • Only whole numbers are supported, up to 1000 digits. Fractions such as 0.5 are rejected as invalid digits.

How to use Number Base Converter

  1. Enter the number and choose the base it is written in.
  2. Read it in every other base; copy any result.

Privacy: how it works

Conversions run in your browser. Nothing you type is sent anywhere.

Frequently asked questions

Can I paste values with 0x or 0b prefixes?

Yes. 0x (hex), 0b (binary) and 0o (octal) prefixes, spaces and underscores are accepted.

Is there a size limit?

Up to 1000 digits. The tool uses exact arbitrary-precision arithmetic, so there is no rounding.