Convert numbers between any bases including binary, octal, decimal, and hexadecimal. Automatically computes results across all common bases as you type
The Base Converter is an online tool that supports conversion between binary, octal, decimal, hexadecimal, and any base from 2 to 36. In computer science, network engineering, and embedded development, converting between different number bases is a fundamental and frequent operation — whether converting a decimal IP address to hexadecimal, or debugging memory addresses during programming.
The tool covers bases 2 through 36, using uppercase letters A-Z to represent digits 10-35. Input validation checks each character against the selected base's valid character set, and results are displayed in real time across all common bases for easy cross-referencing.
Base conversion relies on the mathematical principle of radix conversion. To convert from any base to decimal, the weighted sum method is used: each digit is multiplied by the base raised to its positional power (starting from 0 on the right), and the results are summed. To convert from decimal to any base, the division-remainder method is applied: repeatedly divide by the target base, recording each remainder as the next least significant digit, until the quotient reaches zero.
For example, to convert hexadecimal "FF" to decimal: F×16¹ + F×16⁰ = 15×16 + 15 = 255. To convert decimal 255 to binary: 255÷2=127 r1, 127÷2=63 r1, continuing until the quotient is zero, then reading the remainders in reverse gives 11111111. In JavaScript, parseInt(str, radix) and Number.toString(radix) handle these operations efficiently.
Converting a hex color to decimal RGB:
Input: FF5733 (hexadecimal, two characters per color channel)
Result: Binary: 11111111 01010111 00110011 — Decimal: 16735315
This tool belongs to the encoding/conversion category alongside URL Encode. Use it with MD5 to compare hexadecimal hash representations with their original decimal values.
When writing regular expressions, understanding hex escapes (e.g., \x41) is essential—the Regex Tester can help you debug and validate your patterns online.
Numeric conversion often involves timestamp processing. The Timestamp Converter helps you convert between Unix timestamps and date-time strings, automatically detecting second-level and millisecond-level precision.