Number Base Converter

Type a whole number, choose the base it's written in, and see it in binary, octal, decimal and hexadecimal at the same time, plus any other base from 2 to 36. Numbers of any length are converted exactly, so 64-bit values and larger keep every digit.

Runs in your browser — nothing is uploaded

How to use it

  1. Enter the number. Prefixes such as 0x (hex), 0b (binary) and 0o (octal) are accepted, and spaces or underscores between digits are ignored.
  2. Pick the base the number is written in: 2, 8, 10, 16, or “Other” for anything from 2 to 36.
  3. Read all conversions at once. Choose uppercase letters for hex and turn on digit grouping for readability.
  4. Set the extra target base if you need, for example, base 36 or base 3, and copy any row.

Common uses

  • Reading memory addresses, error codes and color values written in hexadecimal.
  • Checking bit masks, flags and permissions in binary.
  • Computer science homework on positional number systems.
  • Decoding short IDs that use base 36.
  • Verifying 64-bit and larger integers without losing precision to floating point.

Examples

InputConverted
255 (decimal)Binary 11111111 · Octal 377 · Hex FF
0x1F (hex)Decimal 31 · Binary 11111
1010 (binary)Decimal 10 · Hex A
18446744073709551615 (decimal)Hex FFFFFFFFFFFFFFFFThe largest unsigned 64-bit integer, 2⁶⁴ − 1, converted exactly.
−42 (decimal)Binary −101010 · Hex −2ANegative numbers keep a minus sign; no two's-complement encoding is applied.
ZZ (base 36)Decimal 1295

Frequently asked questions

How do I convert binary to decimal?

Multiply each digit by 2 raised to its position, counting from 0 on the right, and add the results. 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11. The converter does this for any length of input.

How do I convert decimal to hexadecimal?

Divide the number by 16 repeatedly and write down the remainders, using A–F for 10–15; reading the remainders from last to first gives the hex number. 255 ÷ 16 = 15 remainder 15, so 255 = FF.

Why do programmers use hexadecimal?

One hex digit stands for exactly four binary digits, so long binary values become short and easy to read: 1111 1111 is FF. Colors (#FF8800), memory addresses and byte values are usually written in hex.

Does it support fractions or negative numbers?

Negative whole numbers are supported and keep their minus sign. Fractions are not: the converter works with integers only.

Is there a size limit?

Input can be up to 5,000 digits long. Calculations use arbitrary-precision integers, so very large values are exact, unlike tools based on standard floating-point numbers that lose precision above 2⁵³.