TextSorter
Decimal Base 10
Binary Base 2
Hexadecimal Base 16
Octal Base 8
Custom Base Converter (Base 2–36)
from base to base
Result: Enter a number and click Convert

What is Base Conversion?

A number base (or radix) determines how many unique digits are used to represent numbers. The most familiar is base 10 (decimal), which uses digits 0–9. Computers and digital systems rely heavily on other bases for storage and communication.

The Four Most Common Bases

Why Does Base Conversion Matter?

Understanding base conversion is fundamental to computer science. Memory addresses are written in hex, network masks in binary, and file permissions in octal. Web developers use hex color codes like #FF5733 daily. Cryptographic hashes and checksums are typically expressed as hexadecimal strings. Knowing how bases relate to each other makes debugging, reverse engineering, and low-level programming significantly easier.

Quick Reference: 0–15 in All Four Bases

This table shows the same values expressed in decimal, binary, hexadecimal, and octal — the most commonly needed range when working with 4-bit nibbles.

Decimal Binary Hex Octal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000810
91001911
101010A12
111011B13
121100C14
131101D15
141110E16
151111F17

Common Conversions Reference

Hex Color Codes

Web colors are written as three hex byte pairs (RRGGBB), each from 00 to FF.

ColorHexRed (Dec)Green (Dec)Blue (Dec)
White#FFFFFF255255255
Black#000000000
Red#FF000025500
Lime#00FF0002550
Blue#0000FF00255
Yellow#FFFF002552550
Cyan#00FFFF0255255
Magenta#FF00FF2550255

Common Binary Patterns

PatternBinaryDecimalHexMeaning
All zeros (byte)00000000000Null / off
All ones (byte)11111111255FFFull / max byte
High nibble set11110000240F0Upper 4 bits
Low nibble set00001111150FLower 4 bits
Powers of 2 — 1011111111277FMax signed byte
Unix rwxr-xr-x1111011014931EDOctal 755

Frequently Asked Questions

What is hexadecimal and why is it used?
Hexadecimal (base 16) uses digits 0–9 and letters A–F. Each hex digit represents exactly 4 binary bits, making it a highly compact way to write binary data. It is used in color codes, memory addresses, machine code, and cryptographic hashes.
How do I convert decimal to binary?
Divide the decimal number by 2 repeatedly, recording each remainder. Read the remainders from bottom to top to get the binary result. For example, 13 becomes 1101 in binary. You can also just type 13 in the Decimal field above and the binary value appears instantly.
What is octal used for?
Octal (base 8) is most commonly seen in Unix/Linux file permissions. The command chmod 755 sets permissions using octal digits — 7 (rwx), 5 (r-x), 5 (r-x) for owner, group, and others respectively.
How do computers use binary?
All data in a computer — numbers, text, images, instructions — is ultimately represented as binary (1s and 0s) because transistors have two stable states. Eight bits form a byte, which can hold 256 different values. Binary arithmetic is performed directly by hardware logic gates, making it the foundation of all digital computing.

Related Tools