Hexadecimal (hex) is a base-16 number system that uses digits 0 through 9 and letters A through F to represent values. One hexadecimal digit represents four binary digits (bits). For example, the hex digit F equals 1111 in binary and 15 in decimal. Hexadecimal notation is written with the prefix 0x, such as 0xFF for 255 or 0xDEADBEEF for the 32-bit value 3735928559. Hexadecimal is ubiquitous in computing because it provides a compact representation of binary data that is easier for humans to read than long strings of 0s and 1s.
Computers work in binary (base-2), but binary numbers are long and difficult to read. Decimal (base-10) is what humans naturally use. Hexadecimal (base-16) bridges this gap: it is compact enough to be practical yet represents binary data exactly. Since one hex digit encodes four bits, two hex digits encode one byte (8 bits). This makes hex the standard for representing memory addresses, color codes, cryptographic hashes, and raw binary data. Web developers use hex for CSS color codes like #5DCAA5. Security researchers use hex for analyzing malware and cryptographic values. Embedded systems programmers use hex for register values and firmware dumps.
Color codes in web design are hexadecimal RGB values. #FF0000 is pure red (255 red, 0 green, 0 blue). Memory addresses in debuggers and assembly language are shown in hex. Unicode escape sequences in strings use hex, e.g., \u00A9 for the copyright symbol. Cryptographic hashes like MD5 and SHA-256 are represented as hex strings. MAC addresses for network interfaces use hex, such as 00:1A:2B:3C:4D:5E. File headers and magic bytes are identified by hex values, like 89 50 4E 47 for PNG files.
| Hex | Decimal | Binary | Octal |
|---|---|---|---|
0x00 |
0 | 0000 | 0 |
0x0F |
15 | 1111 | 17 |
0xFF |
255 | 11111111 | 377 |
0x100 |
256 | 100000000 | 400 |
Enter any number in hexadecimal, decimal, binary, or octal format. The tool automatically detects the input format and converts to all other bases. Hex input can include the 0x prefix or not. Binary input should start with 0b. Octal input should start with 0o. The tool displays the ASCII character (if applicable), and if your input is a valid color code (3 or 6 hex digits), a live color preview appears. Click Copy Results to copy all conversions to your clipboard.
Decimal (base-10) is the standard number system used in everyday math and most programming. Binary (base-2) is the fundamental language of computers, using only 0 and 1. Octal (base-8) is historically used in Unix/Linux file permissions (chmod). For example, file permission 755 in octal means owner read-write-execute (7), group read-execute (5), and others read-execute (5). Understanding the relationship between these bases is essential for low-level programming, systems administration, and debugging.
This tool runs 100% client-side in your browser. No data is transmitted to any server. Your conversions never leave your machine. There are no usage limits, no accounts required, and no telemetry tracking. Feel free to convert sensitive values like cryptographic hashes or private key fragments without worry.