Number Base Converter

Convert between binary, octal, decimal and hexadecimal.

Convert a number between bases 2 and 36 and see binary, octal, decimal, hexadecimal and one custom base at once. It uses BigInt, so very large integers stay exact, and negative values are supported. Each result has its own copy button, which suits programmers working with bit masks, colour values and IDs.

What is a number base?

A number base, or radix, is how many distinct digits a positional numeral system uses. Decimal is base 10 with digits 0-9. Binary is base 2, octal base 8 and hexadecimal base 16, which adds the letters a-f for values 10 to 15. Programmers favour them because one hex digit maps to exactly four bits and one octal digit to three. Higher bases up to 36 use all letters a-z as digits, which is how compact identifiers are often written. The value is identical in every base; only the notation changes.

How to use Number Base Converter

  1. Enter the number Type the value in the Number field.
  2. Set the From base Choose the base the number is written in, from 2 to 36.
  3. Optionally set a custom base Pick a Custom target base to get an extra row beyond the four standard ones.
  4. Copy a result Each row shows Binary, Octal, Decimal, Hexadecimal and your custom base, with a copy button.

Frequently asked questions

What bases are supported?

Any base from 2 to 36. Binary, octal, decimal and hexadecimal are always shown, plus one custom base you choose.

Are huge numbers accurate?

Yes. The tool uses BigInt, so integers of any length are converted exactly instead of losing precision.

Does it handle negative numbers?

Yes, put a minus sign in front. The result keeps the sign; it is not shown in two's complement.

Can I enter fractions?

No. Only whole numbers are supported, so a decimal point gives a not-valid error.

Why are letters used as digits?

Bases above 10 need more symbols, so a-z stand for values 10 to 35. Hexadecimal uses a-f.