Overview / Developer & Code / Number Base Converter (Binary, Hex, Decimal)
Developer & Code 100% In-Browser & Offline

Number Base Converter (Binary, Hex, Decimal)

Convert integers between binary, octal, decimal, hexadecimal and any base from 2 to 36 – with exact results for very large numbers.

Paste or type your input; results appear instantly and errors are shown below the input.

Your files and input never leave your browser – nothing is uploaded.

A number base converter with five rows

The debugger prints 0xDEADBEEF and you need the decimal value. Type it in, pick the base it is written in, and the page fills five rows at once: base 2, 8, 10, 16 and one base of your choice from 2 to 36. Only whole numbers work.

From typed value to copied row

  1. The Value field starts with 255, read as base 10. Replace it with your number.
  2. Open the From base list and choose 2, 8, 10, 16 or Custom base.
  3. For Custom base, a small number field appears next to the list. Type the base there.
  4. Read the rows. They change on every key press, so there is no Convert button. With an empty field the page asks you to enter a number.
  5. Press Copy next to the row you need.

Why 0xFF fails in a decimal field

The parser is strict, and its rules are short.

  • Upper and lower case letters are the same digit.
  • Spaces and underscores are removed first, so 1111_0000 and ff ff are valid.
  • A prefix is stripped only when it fits the From base: 0x for 16, 0b for 2, 0o for 8. Enter 0xFF with base 10 and the x counts as an invalid digit.
  • A decimal point, a comma or a plus sign gives the message "Invalid digit for the selected base."

A leading minus is kept. The result is a signed number such as -FF, not a two's complement bit pattern. Results are in capital letters and have no prefix.

The Custom base row always follows the small number field, even when From base is something else. That field starts at 36. A value outside 2 to 36 is clamped into the range. The math uses BigInt, so no fixed size limit exists. Only the memory of your device counts.

Numbers people really convert

Octal 755 from a chmod line is 493 in decimal, which some APIs expect for a file mode. The colour #FF8800 splits into 255, 136 and 0 with three short conversions. A homework answer, binary 1101 0110, checks out as hex D6. The ID zz in base 36 is 1295. And 2^64 is 18446744073709551616, or a 1 followed by 16 zeros in hex.

The number stays in the tab

JavaScript on the page does the conversion. Nothing is sent, and the Network tab of the developer tools shows no request. Copy puts the text of one row on your clipboard.

Frequently asked questions (FAQ)

Pick 16 in the From base list, enter the hex value with or without 0x, and read the Decimal row. For example, FF gives 255.