Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal.

Loading tool…

Number Base ConverterType a number in any base — binary, octal, decimal or hexadecimal — and the other three update instantly. BigInt arithmetic means arbitrarily large integers convert without precision loss, and negative values are supported. Everything is computed locally in your browser.

What is Number Base Converter?

The Number Base Converter is a free online radix conversion tool that converts integers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Type a number into any field and the other three update instantly, so it works as a decimal-to-binary, decimal-to-hex, hex-to-decimal, or binary-to-octal converter. It is used by programmers, students, and electronics or networking engineers who read bitmasks, color codes, memory addresses, and permission flags. Because it uses BigInt math, it converts arbitrarily large integers without precision loss and supports negative numbers.

How to use Number Base Converter

  1. Pick the field for the base your number is already in: Binary (base 2), Octal (base 8), Decimal (base 10), or Hex (base 16).
  2. Type or paste your integer into that field; the other three fields recalculate as you type.
  3. Add a leading minus sign for negative values; hex letters a-f are accepted in either case and shown back in uppercase.
  4. Use the Copy button shown next to any non-empty field to copy that representation to your clipboard.
  5. If a character is not valid for the chosen base, read the invalid-digits note and fix the input.
  6. Press Clear to empty every field and reset editing to the Decimal field.

Examples

Decimal to hex, binary, and octal

Input

255 (Decimal)

Output

Binary 11111111, Octal 377, Hex FF

Hex to decimal

Input

FF (Hex)

Output

Decimal 255, Binary 11111111, Octal 377

Negative decimal value

Input

-10 (Decimal)

Output

Binary -1010, Octal -12, Hex -A

Frequently asked questions

Which number bases does it support?
Four: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Editing any one field instantly converts to the other three.
Can it handle very large numbers and negatives?
Yes. It uses BigInt arithmetic, so arbitrarily large integers convert without precision loss, and a leading minus sign gives negative values in every base.
Why do I see an invalid-digits message?
You entered a character not allowed for that base, such as 2 in a binary field or G in a hex field. Binary accepts 0-1, octal 0-7, decimal 0-9, and hex 0-9 plus a-f. Remove it and the fields update again.
Does it convert fractions or decimal points?
No. It works on whole integers only and does not handle fractional or floating-point values.
Is my data uploaded anywhere?
No. Every conversion runs entirely in your browser with client-side JavaScript. Nothing you type is sent to a server or stored online.

Related tools