If you’ve ever opened a color picker and seen a code like #FF5733, or looked at a memory address in a debugger, you’ve run into hexadecimal — base-16, one of the number systems computers and designers rely on every day. Here’s what it actually means and how to convert between hex and everything else.
What Makes Hexadecimal “Base-16”
Our everyday numbers are base-10 (digits 0-9). Hexadecimal uses sixteen symbols instead: 0-9, then A, B, C, D, E, and F to represent 10 through 15. Each hex digit maps neatly onto exactly four binary digits (bits), which is why programmers like it — a byte (8 bits) always fits into exactly two hex characters, no matter how large or small the value.
Hex vs. Binary vs. Decimal
The same value can be written three different ways: 77 in decimal is 1001101 in binary and 4D in hexadecimal. Hex mainly exists as a shorter, more human-readable stand-in for binary — nobody wants to read a 32-character binary string when eight hex characters say the same thing.
Our own Hex Converter and Text to Hex Converter handle these conversions instantly, and if you’re working with plain binary instead, the Binary Translator (also called a binary converter) turns text straight into 1s and 0s.
Where You’ll Actually See Hex in Real Life
Web and design colors are the most common example — #FFFFFF is white, #000000 is black, and every shade in between is a six-digit hex code. Developers see hex constantly too: memory addresses and error codes are almost always shown in hex rather than binary or decimal, MAC addresses and hardware IDs are usually written as pairs of hex digits separated by colons, and hex editors let you inspect a file’s raw bytes when something needs debugging below the text layer.
Hex in Hashes: What an MD5 Fingerprint Looks Like
A hash function turns any text or file into a short, fixed-length fingerprint, and the result is almost always written in hexadecimal. An MD5 hash is 32 hex characters. Change a single character in the original and the whole fingerprint changes, while the same input always gives the same hash on any computer. The most common everyday use is checking that a download was not corrupted or tampered with: compare the hash you generate with the one the site publishes. MD5 is fine for that, but it is not secure for storing passwords, where stronger algorithms like SHA-256 are used instead. See our guide to creating a strong password for the safe side of this, or generate a hash yourself with the MD5 Generator.
The Hex Digits Chart
- 0 = 0 decimal = 0000 binary
- 1 = 1 decimal = 0001 binary
- 2 = 2 decimal = 0010 binary
- 3 = 3 decimal = 0011 binary
- 4 = 4 decimal = 0100 binary
- 5 = 5 decimal = 0101 binary
- 6 = 6 decimal = 0110 binary
- 7 = 7 decimal = 0111 binary
- 8 = 8 decimal = 1000 binary
- 9 = 9 decimal = 1001 binary
- A = 10 decimal = 1010 binary
- B = 11 decimal = 1011 binary
- C = 12 decimal = 1100 binary
- D = 13 decimal = 1101 binary
- E = 14 decimal = 1110 binary
- F = 15 decimal = 1111 binary
Hex to Decimal Examples
Each hex position is worth 16 times the one on its right. Examples:
- 2F = 2 × 16 + 15 = 47
- FF = 15 × 16 + 15 = 255
- 1A3 = 1 × 256 + 10 × 16 + 3 = 419
- 7E = 7 × 16 + 14 = 126
Reading a Color Code
A code such as #FF5733 has three pairs: FF (red = 255), 57 (green = 87) and 33 (blue = 51). Mixing those gives an orange-red. Three-digit shorthand such as #FFF doubles each digit, so it equals #FFFFFF, which is white.
How to Spot Hex in the Wild
Hex numbers often carry a marker so they are not confused with decimal: a leading 0x in programming (0xFF), a # in web colors, or a trailing “h” in some assembly languages.
Text in Hex
Every ASCII character is two hex digits. The word “Hi” is 48 69 in hex, “OK” is 4F 4B, and a space is 20. Our Text to Hex Converter does this for any text, and the binary versions are covered in binary to hexadecimal.
Practice
Convert 3C to decimal (answer: 60), and convert 200 to hex (answer: C8). To subtract hex values, read hex subtraction explained.
Converting by Hand (If You’re Curious)
To convert decimal to hex manually, divide repeatedly by 16 and read the remainders backward. It’s a useful trick to understand once, but for anything beyond a quick check, a converter saves the arithmetic and removes the room for error.