Number Base Converter

Convert between decimal, hex, binary and octal with arbitrary precision.

WebRuns in your browser

About this tool

Convert a whole number between binary, octal, decimal and hexadecimal. Pick the base of what you typed and all four forms are shown.

Numbers can be any size, because the conversion does not use JavaScript's 64-bit floating point numbers. A sign, a 0x, 0b or 0o prefix, underscores and spaces are accepted. Input is limited to 10,000 characters.

How to use it

  1. Type the number.
  2. Pick the base it is written in.
  3. Read it in binary, octal, decimal and hexadecimal and copy the one you need.

Example

Input:

255 (decimal)

In every base:

Binary       11111111
Octal        377
Decimal      255
Hexadecimal  FF