Number Base Converter

Works fully offline

Pick the base your number is currently in, and this tool shows the equivalent value in the other three simultaneously, using arbitrary-precision math so large hex values convert correctly.

This number is currently in
Binary
Octal
Decimal
Hexadecimal

Overview

Binary, octal, decimal, and hexadecimal all represent the same numeric value, just grouped differently — binary for bit-level detail, hex for compact byte/color/memory-address notation, decimal for everyday reading. Developers cross this boundary constantly: a color code in hex, a file permission in octal, a bitmask in binary. This tool converts one input into all three other bases at once, using JavaScript's BigInt under the hood so large hexadecimal values (memory addresses, 64-bit flags) convert exactly instead of losing precision.

Examples

Decimal to other bases

255
Binary: 11111111 — Octal: 377 — Hex: FF

Hex to other bases

1F4
Binary: 111110100 — Octal: 764 — Decimal: 500

How It Works

  1. Select the base your number is currently in — Binary, Octal, Decimal, or Hexadecimal.
  2. Enter the number in that base.
  3. Click Convert to see it displayed in all four bases at once.

Use Cases

Reading a hex color or memory address

Convert a hex value to decimal to understand its actual magnitude, or the reverse when you know a decimal value and need its hex form.

Working with Unix file permissions

Convert an octal permission value like 755 to binary to see exactly which read/write/execute bits are set.

Tips

  • An optional 0x, 0b, or 0o prefix is accepted and stripped automatically, regardless of which base is selected.
  • A leading minus sign is supported for negative numbers, shown consistently across all four bases.

FAQ

No. All conversion happens entirely in your browser using JavaScript's BigInt.

No practical limit — conversion uses BigInt for arbitrary-precision math, so very large hexadecimal or binary values convert exactly instead of losing precision the way JavaScript's regular numbers would beyond 2^53.

Negative numbers are shown as a minus sign followed by the magnitude in each base (sign-and-magnitude), not two's complement — two's complement requires a fixed bit width, which this tool doesn't assume.

The tool shows an error naming the invalid input and the base you selected, instead of guessing or silently ignoring the invalid character.

Related Tools