Base Number Converter – Convert Between Any Numeral Systems
The Base Number Convertertranslates integers and fractional numbers between any two numeral systems from base 2 to base 36. Whether you need binary, octal, decimal, hexadecimal, or an arbitrary base like base 32 or base 36, this tool handles them all in one place — with optional two's complement signed-integer interpretation, digit grouping, standard prefixes, and a step-by-step division-remainder walkthrough.
What Is a Number Base?
A numeral base (also called a radix) defines how many unique digit symbols a number system uses. Base 10 (decimal) uses digits 0–9 and is the everyday standard. Base 2 (binary) uses only 0 and 1 and is the native language of every digital processor. Base 16 (hexadecimal) uses 0–9 plus A–F and is ubiquitous in color codes, memory addresses, and data encoding. Bases above 10 borrow letters from the alphabet: base 36 uses all of 0–9 and A–Z, giving 36 distinct symbols per digit position.
How the Conversion Works
Conversion happens in two stages. First, the tool parses every digit of the source number according to the From Base, assigning each character its positional value (digit × base^position), and sums them to obtain a decimal intermediate. Second, it applies thedivision-remainder algorithm: the decimal value is repeatedly divided by the target base and the remainders — read in reverse order — form the output. For fractional parts the tool uses repeated multiplication: multiply the fraction by the target base, record the integer portion, and repeat for the remaining fraction.
Enable Show Steps to see every division step laid out as a table so you can follow the working by hand.
Two's Complement Signed Integers
Modern processors store negative integers using two's complementencoding. In 8-bit two's complement, the value 0xFF (hex) equals -1 decimal because the leading bit signals a negative number. Enable Signed Integer mode and choose a bit width — 8, 16, 32, or 64 bits — to apply this interpretation. This is essential when working with processor registers, disassembled machine code, or network protocol fields.
Prefix Display and Digit Grouping
Standard programming languages use prefixes to make the base explicit: 0b for binary, 0o for octal, and 0x for hexadecimal. Enable Prefix (0b / 0o / 0x) to add these automatically to the output.
Long binary numbers are notoriously hard to read. The Group every N digits option inserts spaces at regular intervals from the right (for example, every 4 binary digits: 1111 0000 1010 0101), making patterns and nibble boundaries immediately visible.
Fractional Numbers and Precision
Enter a decimal point in the input to convert non-integer values. For example, 0.1 in decimal becomes 0.0001100110011... in binary — an infinitely repeating fraction — because most decimal fractions have no finite binary representation. The Precision setting controls how many digits appear after the point in the output (0–20 places).
Color Code Helper
When the input or output in base 16 is exactly six characters, the tool recognises it as an RGB color triplet and shows a color swatch. For example, entering FF6600 in hexadecimal displays an orange swatch alongside the value, making it easy to visually verify web colors.
Common Use Cases
- Binary ↔ Decimal: understanding how computers store integer values, verifying bitfield calculations.
- Hex ↔ Decimal: decoding memory addresses, CSS color codes, and network packet values.
- Octal ↔ Binary: translating Unix file permission codes such as
755into their binary bit patterns. - Arbitrary bases (2–36): working with Base32 data encoded URLs, Base36 short IDs, or ternary logic experiments.
- Two's complement: interpreting raw register dumps or signed fields in binary protocols without manual arithmetic.
Accuracy and Limitations
Integer conversions are exact for values up to JavaScript's safe integer limit of 253 − 1 (9,007,199,254,740,991 in decimal). Larger integers may lose precision due to floating-point representation. For cryptographic-grade large integers, use a dedicated arbitrary precision library instead. Fractional conversions are inherently approximate for most base combinations; increase the Precision value to see more digits.