Number Base Converter: Binary, Octal, Decimal, Hex and Roman Numerals

Convert whole numbers between binary, octal, decimal, hexadecimal and any base up to 36. Roman numerals are on a second tab.

Loading tool…

How to use the Number Base Converter

  1. Type your number and choose the base it is written in.
  2. Read the value in binary, octal, decimal, hex and your chosen custom base.
  3. Copy any row with its Copy button.
  4. Check the two's complement table for 8, 16, 32 and 64-bit signed values.
  5. Open the Roman numerals tab, or the IEEE 754 float tab to see how a decimal is stored as a float.

About this tool

Numbers can be written in different bases. Decimal uses ten digits, binary uses 0 and 1, octal uses 0 to 7, and hexadecimal uses 0 to 9 and A to F. Beyond base 16, letters continue up to Z for base 36. Computers store binary, and hex and octal are compact ways to write it, for instance 255 is 11111111 in binary, 377 in octal and FF in hex.

The converter uses arbitrary-precision integers (BigInt), so numbers with dozens or hundreds of digits are converted exactly rather than rounded. Negative numbers and the prefixes 0b, 0o and 0x are accepted, and spaces or underscores in your input are ignored. Fractions are not supported, only whole numbers.

Under the number table, a two's complement view shows how a signed integer is stored in 8, 16, 32 and 64 bits (for example -1 is 11111111 in 8 bits), and shows Out of range when it does not fit. The IEEE 754 tab splits a decimal number into sign, exponent and fraction bits for 32-bit and 64-bit floats, with the hex form.

Roman numerals use the letters I, V, X, L, C, D and M and cover 1 to 3999 in the standard form. Subtractive pairs such as IV (4), IX (9), XL (40), XC (90), CD (400) and CM (900) are used. When you enter a Roman numeral, it must be written in standard form: IIII is rejected and the tool suggests IV.

Frequently asked questions

How do I convert binary to decimal?

Type the binary number, choose Binary (base 2) as the source and read the Decimal row. 1011 gives 11.

What is the largest number I can convert?

There is no practical limit. BigInt arithmetic keeps every digit exact.

Why are Roman numerals limited to 3999?

Standard Roman numerals have no symbol for 5000 or above and use at most three repeats of a letter, so 3999 (MMMCMXCIX) is the largest.

Does it handle negative numbers and fractions?

Negative whole numbers work. Fractions are not supported.

Need a custom tool or website?

IDM Valley builds web apps, calculators, AI chatbots and automation for businesses. Fixed prices, code in your name.

Get a free quote

Have a project in mind?

Tell us what you need: a website, landing page, AI chatbot or automation. You get a clear scope and a fixed price within one working day. Free, no obligation.


  • avshack
  • DivineBamboo
  • goldleaf
  • janapril
  • kaizen
  • kwc
  • modv
  • pixelrush
  • revital
  • riderzplanet
  • sandsfashions
  • avshack
  • DivineBamboo
  • goldleaf
  • janapril
  • kaizen
  • kwc
  • modv
  • pixelrush
  • revital
  • riderzplanet
  • sandsfashions