Binary Converter Online — Binary, Decimal, Hex & Octal
Type a number in any field and watch every other base update instantly. This free binary converter handles all four number systems used in computing — binary, octal, decimal, and hexadecimal — in a single tool. No install, no account, no limits.
Whether you're a developer debugging memory addresses, a student learning data structures, or just need to convert 1010 to decimal fast, you're in the right place.
How to Use the Binary Converter
- Select your input base — choose Binary (base 2), Octal (base 8), Decimal (base 10), or Hexadecimal (base 16) from the dropdown.
- Type your number — the converter accepts raw digits or common prefixes like
0b,0o, and0x. - Read all four outputs at once — binary, decimal, hex, and octal update in real time as you type.
- Copy any result — click the copy icon next to each output to grab the value instantly.
The Four Number Systems — What Each One Is and When to Use It
Binary (Base 2) is the native language of every digital computer. It uses only two digits — 0 and 1 — where each position represents a power of 2. Every byte of data your machine processes, from a single character to a 4K video frame, is ultimately represented as binary. Formula (binary → decimal): multiply each bit by 2 raised to its position (right = position 0). Example: 1010 = (1×2³) + (0×2²) + (1×2¹) + (0×2⁰) = 10.
Octal (Base 8) uses eight digits (0–7), where each digit maps to exactly three binary bits. It was the dominant human-readable format in early minicomputers and remains relevant today for Unix and Linux file permissions — chmod 755 is octal. Formula: multiply each digit by 8 raised to its position. Example: 17 (octal) = (1×8¹) + (7×8⁰) = 15.
Decimal (Base 10) is the system we use in everyday life. Every digit represents a power of 10. Computers display results in decimal because it's the most intuitive format for humans, even though the underlying hardware operates in binary.
Hexadecimal (Base 16) uses sixteen symbols: digits 0–9 and letters A–F (where A=10 through F=15). Each hex digit represents exactly four binary bits, making it a compact and readable shorthand for raw binary data. Used everywhere in software: memory addresses, color codes (#FF5733), byte values, MAC addresses, and IPv6. Formula: multiply each digit by 16 raised to its position. Example: 2A = (2×16¹) + (10×16⁰) = 42.
Common Use Cases
- Web development: CSS color values like
#1a2b3care hexadecimal. Convert them to decimal RGB components or see the raw binary representation to understand bit patterns. - Linux file permissions:
chmod 755— each octal digit (7, 5, 5) maps to three permission bits (read/write/execute). Our bit visualizer shows exactly which bits are set. - Embedded systems and firmware: Microcontroller registers are read and written in hex. Convert a register value like
0xFFto binary to see which control bits are active. - Networking: IPv4 addresses are four decimal octets; IPv6 uses groups of four hex digits. Binary representation reveals subnet masks and address classes.
- Computer science education: Understanding how number systems work is foundational for binary arithmetic, two's complement, floating-point representation, and assembly language.
Frequently Asked Questions
What is a binary converter?
A binary converter is a free online tool that converts numbers between the four most common numeral systems in computing: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). This converter updates all outputs in real time as you type, so you never need to run a separate conversion for each system.
How do I convert binary to decimal?
Multiply each binary digit by 2 raised to its positional value (starting at 0 from the right), then sum all the results. For example: 1011 = (1×2³) + (0×2²) + (1×2¹) + (1×2⁰) = 8 + 0 + 2 + 1 = 11. This converter does the calculation instantly, but understanding the formula helps you verify results and work with binary arithmetic by hand.
How do I convert decimal to binary?
Divide the decimal number repeatedly by 2 and record the remainder at each step. Read the remainders from bottom to top to get the binary result. Example: 13 → 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1 → binary = 1101. The converter handles any positive integer instantly.
How do I convert binary to hexadecimal?
Group the binary digits into sets of four from the right (pad with leading zeros if needed), then convert each group to its hex equivalent. Example: 10101100 → 1010 (A) + 1100 (C) = AC. Because one hex digit equals exactly four bits, this grouping always works cleanly.
What is hexadecimal used for in programming?
Hex is the standard notation for memory addresses, byte values, color codes, and machine-level data in virtually every programming environment. Two hex digits represent exactly one byte (8 bits), making hex far more compact than binary while remaining easy to convert back. You'll encounter it in debuggers, disassemblers, network protocols, and HTML/CSS color values.
What is octal used for today?
Octal's main modern use is Unix and Linux file permissions. The chmod command uses three octal digits: the first for the owner, the second for the group, and the third for others. Each digit encodes three permission bits — read (4), write (2), and execute (1) — as a sum. chmod 755 means owner has all permissions (7=4+2+1), group and others can read and execute (5=4+1).
Why do computers use binary instead of decimal?
Electronic circuits have two reliable states: voltage present (1) and voltage absent (0). Building a circuit that reliably distinguishes ten voltage levels would be far more complex and error-prone. Binary maps directly to these two physical states, enabling extremely fast and reliable computation using billions of simple transistors.
What is the difference between binary and hexadecimal?
Binary is base 2 and uses only 0 and 1 — it's the actual format computers store and process data in. Hexadecimal is base 16, using 0–9 and A–F, and serves as a human-readable shorthand for binary: one hex digit always equals exactly four binary bits (a nibble). Developers prefer hex because it's 4× shorter than binary while still being trivially convertible.
Can I convert negative numbers or decimals?
This converter handles positive integers only, which covers the most common use cases. Negative integers in binary are typically represented using two's complement notation, which requires specifying a bit width (8-bit, 16-bit, or 32-bit). Fractional values use binary notation like 0.101 (= 0.625), which is a separate conversion not covered here.
What does the bit visualizer show?
The bit visualizer displays each individual bit of the binary result as a colored square — filled (blue) for 1, empty for 0 — grouped in sets of four for readability. It automatically scales to 8-bit, 16-bit, or 32-bit depending on the value size, and labels the most significant bit (MSB) on the left and the least significant bit (LSB) on the right. This makes it easy to see which bit positions are set and understand byte boundaries.
Resources
- MDN Web Docs — parseInt() — Reference for JavaScript's built-in base conversion function, with examples for binary, octal, and hex parsing.
- Wikipedia — Binary number — Comprehensive overview of binary representation, arithmetic, and history in computing.
- The Linux Documentation Project — File Permissions — Explains how Unix octal file permissions work in practice.