nwork

Number Base Converter

Convert numbers between Binary, Octal, Decimal, and Hexadecimal instantly. See all bases at once as you type.

0b
0o
0x

Quick examples

How to Use

  1. 1

    Enter a number

    Type a number in any base field — Binary, Octal, Decimal, or Hexadecimal.

  2. 2

    See all bases instantly

    All other base fields update immediately as you type.

  3. 3

    Copy the result

    Click Copy next to any base to copy that value.

How It Works

This tool converts numbers between Binary, Octal, Decimal, and Hexadecimal simultaneously, updating all four bases live as you type into any one of them.

Why these four bases specifically

Decimal (base 10) is what humans normally use. Binary (base 2) is how computers represent data at the hardware level. Hexadecimal (base 16) is a compact, human-readable shorthand for binary — each hex digit represents exactly 4 binary bits, making it common in programming for memory addresses, color codes, and byte values. Octal (base 8) is less common today but still appears in some Unix file permission notations and older systems.

Precision limits

Numbers are handled accurately up to 2^53 — JavaScript's largest integer that can be represented without precision loss. Beyond that, standard number conversion in most web-based tools (including this one) can't guarantee exact precision, since larger integers require specialized big-number handling.

Examples

Converting a hex color code component

The hex value FF (as used in a color code like #FF0000) converts to decimal 255 — the maximum value for a single color channel byte.

Converting binary to decimal

The binary value 1010 converts to decimal 10 — useful when reading raw binary data or debugging low-level bit representations.

Common Use Cases

  • Converting hex color codes, memory addresses, or byte values to decimal for easier reasoning
  • Checking binary representations of numbers for programming, networking, or computer science learning
  • Converting between bases when reading Unix file permission notation (octal) or low-level system data

Tips

  • Hexadecimal is especially useful because each hex digit maps cleanly to exactly 4 binary bits — this makes it much easier to read and reason about binary data (like memory dumps or color values) than working directly in binary.
  • For numbers beyond roughly 9 quadrillion (2^53), be aware that this and most browser-based converters may lose precision — specialized big-integer libraries are needed for exact conversion at that scale.

Frequently Asked Questions

Related Tools