Convert between decimal (base 10) and hexadecimal (base 16) number systems instantly. Essential for programming, debugging, and color codes.
2026-03-28T00:00:00Z
Quick Select:
Hexadecimal (or hex) is a base-16 number system that uses sixteen distinct symbols: 0-9 represent values zero to nine, and A-F (or a-f) represent values ten to fifteen. It's widely used in computing because each hex digit represents exactly four binary digits (bits), making it a compact way to represent binary data.
Hexadecimal is extensively used in programming for memory addresses, color codes in web design (like #FF5733), representing binary data, Unicode characters, and MAC addresses. It's far more readable than binary while still maintaining a direct relationship with the underlying binary representation.
For example, the decimal number 255 is represented as FF in hexadecimal and 11111111 in binary. The hex version is much more compact and easier to work with than the binary representation.
Note: This converter supports non-negative integers only. It does not handle negative numbers or fractional/decimal values. For those conversions, use specialized tools designed for floating-point hexadecimal representation.
Choose "Decimal → Hex" or "Hex → Decimal" depending on your conversion direction.
Type your number in the input field. For decimal enter 0-9; for hex use 0-9 and A-F letters.
The conversion displays instantly as you type. See both the converted value and binary equivalent.
Use quick-select buttons for common values like 255 (FF) or 65535 (FFFF).
Cross-check using the binary representation. Each hex digit = 4 bits (F = 1111, 0 = 0000).
Convert decimal 255 to hexadecimal:
Hex is compact and directly maps to binary (4 bits per hex digit). It's easier to read and write than binary, making it ideal for memory addresses, color codes, and debugging.
In hexadecimal: A=10, B=11, C=12, D=13, E=14, F=15. These letters extend the digit set beyond 0-9 to create a base-16 system.
Web colors use hex format #RRGGBB where each pair represents Red, Green, and Blue values (0-255 in decimal, 00-FF in hex). For example, #FF0000 is pure red.
No, hexadecimal letters A-F can be uppercase or lowercase. FF, ff, Ff, and fF all represent the same value (255 in decimal).
FF (hexadecimal) equals 255 (decimal). This is the maximum value that can be stored in 8 bits, which is why it's common in color codes and byte representations.
Hex numbers are often prefixed with '0x' (like 0xFF) in programming, or '#' for colors. Without a prefix, context determines the number system being used.
Yes, hexadecimal can represent fractional values using a point (like 1F.8), though this is less common. The digits after the point represent negative powers of 16.
Each hex digit represents exactly 4 binary digits. For example, F₁₆ = 1111₂, and A₁₆ = 1010₂. This makes conversion between hex and binary very straightforward.
Related Tools