Convert numbers between binary, octal, decimal, hexadecimal, and any custom base from 2 to 36. Results update in real time as you type — entirely in your browser.
A number base (or radix) defines how many unique digits a positional numeral system uses. Decimal — base 10 — is what humans use every day, with digits 0–9. But computers store everything as binary (base 2), and programmers frequently work in hexadecimal (base 16) or octal (base 8) because they map cleanly to binary. Understanding base conversions is fundamental for low-level programming, networking, cryptography, color codes, and embedded systems work.
For example, the decimal number 255 is 11111111 in binary — all 8 bits set. In hex it's simply FF, which is why CSS color #FFFFFF means maximum red, green, and blue. Octal 0377 is the same value again. One of the most elegant aspects of hex is that every two hex digits map exactly to one byte, making memory addresses and binary data human-readable at a glance.
chmod 755)
parseInt('FF', 16) → 255
(255).toString(16) → 'ff'
(255).toString(2) → '11111111'
parseInt / .toString
-1 in 8-bit two's complement = 11111111
Number.MAX_SAFE_INTEGER (2⁵³−1)
Every positional numeral system works the same way: each digit position represents a power of the base. In decimal, the number 425 means 4×10² + 2×10¹ + 5×10⁰ = 400 + 20 + 5 = 425. To convert to another base, you repeatedly divide by the target base and collect the remainders. To convert from another base to decimal, multiply each digit by its positional power and sum the results.
This tool uses JavaScript's built-in parseInt(value, fromBase) to parse the input as a decimal integer, then calls .toString(toBase) for each target base. This works reliably for any base between 2 and 36, using digits 0–9 and letters a–z for values 10–35. For very large numbers exceeding JavaScript's safe integer range (Number.MAX_SAFE_INTEGER = 2⁵³−1), consider using the native BigInt type in your own code.