Skip to content

Universal Base Converter & Number Inspector

Convert numbers between any bases from 2 to 36 and inspect the result: signed/unsigned views, bit width, byte order, and code snippets. One synchronized workspace: any base 2-36, signed and unsigned views, bit widths, byte order, and code output - all exact at any size.

Bases 2-36Arbitrary precision (BigInt)Two's complement 8-128 bitBig / little-endian bytes

Exact at any size - computed with BigInt, never a float.

Common Number Bases

Base 2 (Binary)

Computer hardware and bit fields. Digits: 0-1. Prefix: 0b.

Base 8 (Octal)

Unix file permissions, 3-bit groups. Digits: 0-7. Prefix: 0o.

Base 10 (Decimal)

Standard human counting. Digits: 0-9.

Base 16 (Hexadecimal)

Memory addresses, colors, byte dumps. Digits: 0-9, A-F. Prefix: 0x.

Base 36

Maximum alphanumeric base - compact IDs. Digits: 0-9, A-Z.

How conversion works

Every value is parsed to an exact BigInt, then re-emitted in the target base - no floating point anywhere in the pipeline.

Code Examples

// Convert between any bases (2-36)
function convert(num, fromBase, toBase) {
  return parseInt(num, fromBase).toString(toBase);
}
convert("ff", 16, 2);  // "11111111"
convert("1010", 2, 16); // "a"

// For values above 2^53, stay in BigInt:
const big = BigInt("0xffffffffffffffff");
big.toString(8); // "1777777777777777777777"

Frequently Asked Questions

What bases can I convert between?

This converter supports bases 2 through 36. Base 2-10 use digits 0-9, and bases 11-36 use letters A-Z for values 10-35. Prefixes 0b, 0o, and 0x are recognized automatically for binary, octal, and hex.

How big a number can I convert?

Far beyond 64 bits. Conversion runs on BigInt end to end, so values above 2^53 and past 128 bits stay exact. The inspector labels when a value stops being safe as a plain JavaScript Number.

What are the signed and unsigned views?

The signed view reads your value as a two's-complement integer at 8, 16, 32, 64, or 128 bits - so FF is 255 unsigned but -1 signed at 8 bits. The unsigned view is the plain value. A warning appears when the value does not fit the selected width.

What does the byte order (endianness) view show?

It serializes the value's bytes in big-endian order (most significant byte first, like network protocols) and little-endian order (least significant first, like x86 memory). Endianness changes the byte serialization, never the integer itself.

Related Tools

This tool runs entirely in your browser - nothing you enter is uploaded or stored.