Skip to content

Number base converter

Convert exact whole numbers between bases 2–36 with live binary, octal, decimal, and hexadecimal comparisons.

Exact whole-number conversion

Base 16

FF

Bases 2–36 · up to 4,096 digits · negative integers supported. Enter digits without 0x/0b prefixes, commas, or decimal points.

Processed on your device

How it works & useful details

How to use this tool

Enter an integer and its source base. Choose a common-base card, set any target base from 2–36, or swap the bases.

Details and limits

Uses exact integer arithmetic rather than floating-point approximations. Negative numbers are supported. Digits are case-insensitive; letters A–Z represent 10–35. Prefixes such as 0x, separators, and fractional parts are not accepted.

Up to 4,096 input digits. Output is a signed magnitude representation, not fixed-width two’s complement.

About this tool

Number base converter translates exact whole numbers between bases 2 and 36 with live binary, octal, decimal, and hexadecimal comparisons. It is useful for bitmasks, file mode values, and protocol work where the same number appears in several notations.

Because whole numbers are converted exactly, values that exceed safe floating-point ranges are handled without rounding. Everything runs locally and no conversion service is involved.

How to use it

  1. Enter the number and choose its current base.
  2. Review the equivalents in the common bases.
  3. Check the grouped binary view for bit-level work.
  4. Copy the notation you need.

Worked examples

  • 255 in decimal is 11111111 in binary, 377 in octal, and FF in hexadecimal: the largest value of one byte.
  • ZZ in base 36 is 35 × 36 + 35 = 1295 in decimal.
  • −42 in decimal is −101010 in binary, shown as a sign and magnitude.

Each position is worth the base raised to its position. In hexadecimal, 2F is 2 × 16 + 15 = 47. Letters stand for digit values from 10 (A) to 35 (Z), which is why base 36 is the highest base that works with ordinary digits and letters.

Where each base is used

Binary shows individual bits, as in flags, masks, and permissions. Octal survives in Unix file permissions: chmod 755 is 111 101 101. Hexadecimal is the compact way to write bytes: colours (#FF8800), memory addresses, hashes, and MAC addresses. Base 36 appears in short IDs and URL shorteners because it is compact and case-insensitive.

The converter uses exact integer arithmetic, so very long numbers of up to 4,096 digits convert without the rounding that JavaScript's Number type introduces above 2⁵³. Negative numbers are shown with a minus sign, not in two's complement, because two's complement depends on a fixed width such as 8, 16, 32, or 64 bits.

Frequently asked questions

What is the largest number I can convert?

Values are handled as exact whole numbers up to the input character limit, which is far beyond ordinary 64-bit ranges for typical use.

Are fractional numbers supported?

No. The converter works with whole numbers only so the representations stay exact.

Is the input case-sensitive?

Digits above 9 are accepted in either case, so FF and ff both convert correctly from base 16.

Can I paste 0xFF or 0b1010?

Remove the prefix and choose the source base instead: FF with base 16, or 1010 with base 2. Separators such as spaces and underscores are also not accepted.