DevKits

Number Base Converter (Binary, Octal, Decimal, Hex)

Convert numbers between binary, octal, decimal, and hexadecimal. Supports arbitrarily large integers using BigInt.

Last updated:

Decimal255
HexFF
Binary11111111
Octal377

Enter a number in binary, octal, decimal, or hex above to convert it to all other bases at once. Uses BigInt so arbitrarily large integers stay exact. Runs locally.

What is Number Base?

A number base converter translates integers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). These conversions are everyday work in low-level programming, networking, bit manipulation, color codes, and file formats. Because the tool uses JavaScript BigInt, it converts integers of any size precisely — no floating-point rounding on values beyond 2^53.

How to convert between number bases

  1. 1Enter your value in whichever base you have (binary, octal, decimal, or hex).
  2. 2All other bases update instantly.
  3. 3Use the hex output for memory addresses, color codes, or byte values.
  4. 4Copy the representation you need.

Use Cases

Decode hex and binary

Translate a hex memory address, color code, or flag value into decimal to reason about it.

Work with bitmasks

Convert a decimal permission or flag set to binary to see exactly which bits are on.

Read file-format values

Interpret magic numbers and offsets that specs express in hex.

Code Examples

255 in every base

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

Key Concepts

Positional notation
Each digit's value is its symbol times the base raised to its position. In base 16, 'FF' = 15×16 + 15 = 255.
Common prefixes
0b for binary, 0o for octal, 0x for hex in most languages. Decimal has no prefix.
BigInt
A JavaScript type for arbitrary-precision integers, letting the tool convert huge numbers without the 2^53 float limit.

Tips & Best Practices

  • One hex digit maps to exactly four binary digits (a nibble) — handy for reading binary in groups.
  • This tool handles integers; fractional base conversion is a different, less common problem.
  • Watch for prefixes: '0x1F' and '1F' are the same hex value; strip 0x if the field expects raw digits.
  • Negative integers are supported, but two's-complement width depends on your context (8/16/32/64-bit).

Frequently Asked Questions

Are big numbers supported?

Yes. The converter uses JavaScript BigInt, so integers of any size (well beyond 2^53) are converted precisely without floating-point rounding.

Does it support negative numbers or fractions?

Negative integers are supported. Fractional numbers are not — this tool focuses on integer base conversion, which is what most programming and networking use cases need.

Related Tools