Marks Calc
Number tool

Number Base Converter

Convert any positive integer between binary, octal, decimal, hexadecimal — or any arbitrary base from 2 to 36.

How the conversion works

Number-base conversion: parse the input string in its source base (each digit's positional value), then format the result by repeated division-and-remainder in the target base.

When you'll use this converter

  • Programming (decimal ↔ hex for memory addresses, colors)
  • Networking (binary subnet masks)
  • Digital logic and electronics
  • Computer science education

Frequently asked

Why is hex used so much in programming?

Because each hex digit maps exactly to 4 binary bits, making hex a compact way to write binary values. 1 byte = 8 bits = 2 hex digits (00–FF).

Can this converter handle negative numbers?

This converter handles non-negative integers. For signed binary, two's-complement is typically used at a specific bit-width (e.g. 32-bit, 64-bit) — different from a pure base conversion.