Converters

Base Converter

Convert between bases 2–36 including binary, octal, decimal and hex.

Input Number
From
Tips: Supports 0x(hex), 0b(bin), 0o(oct) prefixes. Invalid chars are auto-filtered.
Result
To
Result will be shown here
Quick Convert

What is Number Base Converter?

Number base converter transforms numbers between different numeral systems (binary, octal, decimal, hexadecimal, and more).

Common Bases

  • Binary (2): 0b prefix, e.g., 0b11111111 = 255
  • Octal (8): 0o prefix, e.g., 0o377 = 255
  • Decimal (10): Standard numbers, e.g., 255
  • Hexadecimal (16): 0x prefix, e.g., 0xFF = 255

Use Cases

  • Programming and debugging
  • Color code conversion
  • Network addressing
  • Bitwise operations

Frequently Asked Questions

Why does 0.1 + 0.2 not equal 0.3 in binary?
Computers store fractions in IEEE 754 binary floating point, and 0.1 is an infinitely repeating fraction in base 2 — stored only approximately. That is the origin of the classic interview question. Integer conversions here are exact; decimals show the true floating-point approximation.
Why is hexadecimal everywhere in programming?
Because 16 is 2 to the 4th: one hex digit maps to exactly 4 bits, two digits to a byte. Memory addresses, color values, and hash digests written in hex are compact yet mentally convertible to binary — the ideal bridge between humans and bytes.
How are negative numbers represented in binary?
Modern machines use two’s complement: the top bit signals the sign, and -1 in 8 bits is 11111111. Understanding two’s complement is essential for bit operations, packet inspection, and register reading — the tool handles signed conversions and shows the complement form.