Number Base Converter

Type an integer in any base and see it in binary, octal, decimal and hexadecimal at once — plus any custom base up to 36. BigInt math keeps arbitrarily large numbers exact.

base-converter · live · runs locally

Binary, octal, decimal and hex at a glance

The same integer looks completely different depending on the base you write it in: 255 is 11111111 in binary, 377 in octal and ff in hex. This converter shows all four classic bases simultaneously and live — type in one base, read the rest — plus a custom output for any base from 2 to 36, which covers base-32 identifiers and base-36 short codes.

Two details matter for correctness. Input digits are validated against the source base, so a stray 8 in an octal number produces a clear error instead of a wrong answer. And all arithmetic uses BigInt, so a 40-digit decimal converts exactly — most converters quietly round anything above 253 because they use floating-point math. Everything runs locally in your browser.

How to convert between number bases

  1. Type or paste an integer — 0x, 0b and 0o prefixes are recognized automatically.
  2. Pick the base you are converting from (or a custom base 2–36).
  3. Read binary, octal, decimal and hex instantly, and copy any of them.

Where each base shows up

Binary is the machine's native tongue — you meet it in bitmasks, file permissions and network subnetting. Octal survives mainly in Unix permission bits (chmod 755). Hex dominates anywhere bytes are displayed: memory dumps, MAC addresses, CSS colors and hashes. Base 36 (digits plus a–z) appears in URL shorteners and order references because it makes the shortest human-typable codes. To go the other way — from characters to their byte values — try the Text to Binary Converter, or Base64 when you need whole binary payloads as printable text.

Frequently asked questions

How do positional number bases work?

Each digit position represents a power of the base. In decimal, 255 means 2×100 + 5×10 + 5×1. The same value in base 16 is ff (15×16 + 15) and in base 2 it is 11111111. Higher bases pack more information into each digit, which is why hex strings are a quarter the length of their binary equivalent.

Why do programmers use hexadecimal so much?

Because 16 is a power of 2, one hex digit maps exactly to four binary bits — so a byte is always two hex digits, with no awkward remainder. That makes hex the natural shorthand for memory addresses, color codes like #ff6347, hash digests and raw byte dumps: compact for humans, trivially convertible for machines.

What do the 0x and 0b prefixes mean?

They are conventions from programming languages marking the base of a literal: 0x means hexadecimal (0xff = 255), 0b means binary (0b1010 = 10) and 0o means octal (0o755 = 493). This converter accepts all three prefixes on input and lets them override the selected base, so you can paste literals straight from source code.

What is the largest number this converter can handle?

There is no practical limit. Conversions use JavaScript's BigInt, which is arbitrary-precision integer math — unlike ordinary floating-point numbers, which silently lose accuracy above 2^53 (about 9 quadrillion). A 100-digit decimal number converts to binary exactly, digit for digit.