What is hexadecimal?
Hexadecimal is a base-16 number system that uses 16 digits: 0-9 and A-F. Each hex digit represents exactly 4 binary bits (one nibble), making hex an extremely compact and human-readable shorthand for binary. Computer memory addresses, RGB colors, MAC addresses, and most low-level identifiers are written in hex for that reason.
Why use hex instead of decimal?
Hex aligns naturally with binary because 16 = 2^4. Eight bits collapse to two hex digits, sixteen bits to four — far easier to read than long binary strings or large decimals. Hex also exposes structure: a 32-bit IPv4 address printed as 0xC0A80101 visibly contains the four octets 192, 168, 1, 1.
How does each hex digit map to binary?
Every hex digit is exactly 4 binary bits: 0=0000, 1=0001, 2=0010, 3=0011, 4=0100, 5=0101, 6=0110, 7=0111, 8=1000, 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111. To convert a binary string to hex, group bits into 4-bit nibbles from the right.
How does decimal to hex conversion work?
Repeatedly divide the decimal by 16, recording each remainder (0-15, with 10-15 written as A-F). Read the remainders in reverse to get the hex string. For 255: 255 ÷ 16 = 15 remainder 15 → write F, then 15 ÷ 16 = 0 remainder 15 → write F. Reading reverse gives FF. JavaScript uses (n).toString(16).
Is hex output case-sensitive?
Hex letters A-F can be written in either case — both 0xFF and 0xff parse to 255. This tool emits uppercase by convention because uppercase is the dominant style in C, Java, hardware specs, and most documentation. Lowercase is more common in CSS color codes and Unix tools.
What is the largest decimal I can convert?
Up to Number.MAX_SAFE_INTEGER (2^53 − 1 = 9,007,199,254,740,991). Above that, JavaScript number precision degrades. For 64-bit unsigned integers and bigger, use BigInt or a big-integer library — typical cryptographic and blockchain use cases.
Are CSS colors related to hex?
Yes. CSS colors like #FF8800 are three pairs of hex digits, each pair encoding one byte (0-255) for red, green, and blue. So #FF8800 = R 255, G 136, B 0. This converter helps you go between the two representations.
Is the data sent to a server?
No. All conversion runs in JavaScript inside your browser. Open DevTools → Network and confirm zero requests on Convert. Safe to use with internal IDs, secret tokens, or proprietary numeric data.