Number Base Converter

Convert between binary, decimal, octal, and hexadecimal. Type in any field and all others update instantly.

Last updated April 2026
Base 2
Base 10
Base 8
Base 16
Disclaimer: This tool is provided for general educational and entertainment purposes only. Results are estimates and should not be relied upon for any critical decision. Neither MayoCalc nor Cook Media Systems assumes any liability for consequences arising from the use of this tool. By using this site, you agree to our Terms of Service and Disclaimer.

What Are Number Bases?

A number base (or radix) determines how many unique digits are used to represent numbers. Base 10 (decimal) uses digits 0-9. Base 2 (binary) uses only 0 and 1. Base 16 (hexadecimal) uses 0-9 and A-F. Base 8 (octal) uses 0-7. Different bases are used in different contexts: decimal for everyday math, binary for computer hardware, hexadecimal for programming and color codes, and octal for Unix file permissions.

How to Use This Calculator

Enter a number and its current base, then select the target base. The calculator converts between binary, octal, decimal, hexadecimal, and any custom base from 2 to 36. It shows the step-by-step conversion process and the equivalent value in all common bases simultaneously. The Color Picker uses hexadecimal for color codes.

Common Conversions

Binary to decimal: Each binary digit represents a power of 2. 1010 in binary = 1x8 + 0x4 + 1x2 + 0x1 = 10 in decimal. Hex to decimal: Each hex digit represents a power of 16. FF in hex = 15x16 + 15x1 = 255 in decimal. Decimal to binary: Repeatedly divide by 2 and read the remainders bottom-up. 13 in decimal = 1101 in binary.

Number Base FAQ

Why do computers use binary?
Because electronic circuits have two stable states: on and off (or high voltage and low voltage). Binary (base 2) maps directly to these two states, making it the natural language of digital hardware. Every piece of data in a computer, from text to images to video, is ultimately represented as sequences of 0s and 1s.
Why is hexadecimal used in programming?
Hexadecimal is a compact way to represent binary data. Each hex digit maps to exactly 4 binary digits (bits). So a byte (8 bits) is always exactly 2 hex digits. 11111111 in binary = FF in hex = 255 in decimal. Hex is more readable than long binary strings while maintaining a direct relationship to the underlying binary.

Number Systems in Computing

Binary (base 2) is the foundation of all digital computing because transistors have two states (on/off). Hexadecimal (base 16) is used as a compact representation of binary: each hex digit represents exactly 4 binary digits. Octal (base 8) was common in early computing but has largely been replaced by hexadecimal. In web development, colors are specified in hex (#FF5733 = red 255, green 87, blue 51). In networking, IPv4 addresses are often displayed in dotted decimal but computed in binary for subnet calculations. Memory addresses in debugging tools appear in hexadecimal. ASCII character codes use decimal values (A = 65, a = 97) that correspond to 7-bit binary values. Unicode extends this to handle over 150,000 characters using variable-length encoding (UTF-8).