Number Base Converter (Binary, Octal, Decimal, Hex)
Convert numbers between binary, octal, decimal, hexadecimal and any custom base from 2 to 36.
Loading Number Base Converter (Binary, Octal, Decimal, Hex)… If nothing happens, please enable JavaScript.
Frequently asked questions
Is any data sent to a server when I use this tool?
Why do computers use binary instead of decimal?
Why is hexadecimal used for color codes and memory addresses?
What do octal numbers have to do with Unix file permissions?
Can I convert very large numbers without precision loss?
What is the history of hexadecimal notation in computing?
Are there edge cases with leading zeros or very small numbers?
Does this tool support two's complement for negative numbers?
Which base conversions are worth knowing by heart?
What is a common beginner misunderstanding about binary numbers?
About Number Base Converter (Binary, Octal, Decimal, Hex)
Positional numeral systems represent numbers using a fixed set of digit symbols, where the value of each digit depends on its position. Humans naturally evolved base-10 (decimal) arithmetic, almost certainly because we have ten fingers. But digital computers are built from transistors that can only exist in two states — on or off — making base-2 (binary) the natural language of computing hardware. Every number, instruction, and piece of text stored on any computer anywhere is ultimately encoded as a sequence of ones and zeros. The other bases — octal (base-8) and hexadecimal (base-16) — emerged as convenient shorthand for binary: one octal digit represents exactly three binary digits, and one hex digit represents exactly four, making them far more compact for human reading of binary data.
Developers encounter multiple bases constantly. Hexadecimal is ubiquitous: CSS colors (#ff6600), memory addresses in debuggers (0x7ffee4b3c8d0), file format magic numbers (0xFF 0xD8 for JPEG), Unix file permissions in numeric form (0755), and network MAC addresses all use hex notation. Binary is essential for understanding bitwise operations, flag fields, network subnet masks, and data encoding. Octal appears in Unix file permission mode strings — the familiar chmod 755 or chmod 644 — and in some legacy communication protocols. Base-36 (using digits 0–9 and letters A–Z) is used in URL shorteners and unique identifier schemes that need compact case-insensitive strings.
This converter accepts a value in any base from 2 to 36 and simultaneously displays it in binary, octal, decimal, hexadecimal, and any custom base you specify. The computation uses JavaScript's BigInt type, which supports arbitrary-precision integers — there is no upper limit on the size of the number you can convert, unlike standard Number which loses precision beyond 2^53. All processing runs in your browser with no server communication.
A few nuances to keep in mind: hexadecimal digits use letters A–F (or a–f) for values 10–15, and the case is not semantically meaningful but conventions differ — CPU registers are traditionally shown in uppercase, while CSS colors are commonly lowercase. When entering binary values, be careful with leading zeros — they are valid and preserved in display but do not affect the numeric value. Two's complement notation, used to represent negative integers in hardware, is not produced by this tool because its output depends on the word size (8-bit, 16-bit, 32-bit, 64-bit) of the target system.
From Fingers to Transistors: Why the World Counts in Base 16
Humans have almost certainly used base-10 for thousands of years simply because we were born with ten fingers. Archaeological evidence suggests tally systems going back at least 40,000 years, and the Babylonians developed a sophisticated base-60 (sexagesimal) system around 2000 BCE — a choice that still echoes in our 60-second minutes and 360-degree circles. The decimal system we use today was formalized in India around the 5th–6th century CE with the invention of positional notation and the concept of zero, then transmitted to Europe through Arab mathematicians, giving us the Hindu-Arabic numerals we use today.
The adoption of binary in computing was not inevitable. Charles Babbage's 19th-century mechanical Analytical Engine used decimal. Early 20th-century computing proposals explored base-3 (ternary) and even base-10 electronic systems. Soviet engineers at the Moscow State University actually built a working ternary computer, the Setun, in 1958, arguing it was more efficient than binary. But binary ultimately won because it required the least engineering complexity — a transistor is either on or off, full stop. Any more states means more careful voltage calibration, more heat, and more error.
Hexadecimal became the dominant human-readable representation of binary data thanks to IBM's System/360 in 1964, which standardized the 8-bit byte as the fundamental unit of information. Once bytes were universal, two hex digits mapping to exactly one byte was irresistible for engineers reading memory dumps and register values. The 0x prefix to mark hex literals was introduced by the C language around 1972 and spread to essentially every mainstream language that followed: C++, Java, Python, JavaScript, Go, Rust, Swift, and more. Today, hex is so entrenched in computing culture that color designers, network engineers, and security researchers all think and communicate in base-16 as a second nature.