Number base converter

This number base converter turns integers into binary, octal, decimal, hexadecimal and any custom base from 2 to 36. Type in any field and the others update instantly, even for very large numbers.

Processed on this device. Nothing is uploaded.
Loading Number Base Converter…

How to convert between number bases

  1. Type a number into the Binary, Octal, Decimal or Hexadecimal field.
  2. Read the converted values in every other field as you type.
  3. Set a custom base from 2 to 36 for less common systems like base 36.
  4. Turn on Group digits or Uppercase hex if you like, then copy any value.

What you can do with Number Base Converter

Any field as input
Type in binary, octal, decimal, hex or the custom field and every other representation updates at once.
Bases 2 to 36
The custom field covers every base that can be written with the digits 0–9 and the letters a–z.
Big number support
Uses JavaScript BigInt, so 64-bit, 128-bit and even larger integers convert exactly, without rounding.
Prefixes and separators
Ignores 0x, 0b and 0o prefixes, spaces, underscores and commas, so you can paste values straight from code.
Digit grouping
Group binary into nibbles of 4, hex into bytes of 2 and decimal into thousands for easier reading.
Bit and byte info
Shows how many bits and bytes the number needs, its decimal digit count and whether it's positive or negative.

Binary, octal, decimal and hex number systems

A number base, or radix, is how many distinct digits a system uses. Decimal uses 10, binary uses 2 (0 and 1), octal uses 8 and hexadecimal uses 16, with a–f standing for 10 to 15. Computers store everything in binary, and hex is its compact human-friendly form: each hex digit maps to exactly 4 bits, so one byte is always two hex digits, such as 255 = FF = 11111111. Octal survives mostly in Unix file permissions like 755.

To convert by hand from decimal to another base, divide repeatedly by the base and read the remainders from bottom to top. To go back, multiply each digit by the base raised to its position and add the results; binary 1011 is 8 + 0 + 2 + 1 = 11. This converter handles whole numbers only, so fractions aren't supported, and negative numbers are shown with a minus sign rather than in two's complement form. Base 36 is handy for short, URL-friendly IDs.

Frequently asked questions

Is the number base converter private?

Yes. Conversions are done by JavaScript in your browser, and the numbers you enter never leave your device. There's nothing to install, no account to create and no limit on how many conversions you run.

How do I convert binary to decimal?

Type or paste the binary number into the Binary field, with or without a 0b prefix. The decimal value appears instantly in the Decimal field. Spaces between groups of digits are ignored, so 1111 0000 works as well as 11110000.

Can it convert very large numbers?

Yes. It uses BigInt arithmetic, so there's no practical size limit and no rounding. You can convert 64-bit memory addresses, 128-bit values or numbers with hundreds of digits exactly, unlike calculators that switch to scientific notation.

Does it support negative numbers or fractions?

Negative integers are supported and shown with a leading minus sign in every base, but two's complement representation isn't shown. Fractions and decimal points aren't supported, because the converter works with whole numbers only.

Why do I get an invalid digit error?

Each base only accepts certain digits. Binary allows only 0 and 1, octal 0–7, and hex 0–9 and a–f. A letter like g in the hex field, or a 2 in the binary field, triggers an error message naming the invalid character.