Decimal ↔ Hexadecimal Converter
Free online decimal to hex and hex to decimal converter. Convert numbers between base-10 and base-16 instantly.
⇄
Tip: Type in either field — the other updates automatically. Hex output is uppercase.
💡 Definition
Hexadecimal System
- Hexadecimal (base-16) uses digits 0-9 and letters A-F.
- It is widely used in computing because each hex digit represents exactly 4 bits, making it a compact way to express binary data.
- Colors, memory addresses, and MAC addresses all use hex.
📖 How to use
Step by Step
- Enter a decimal number on the left
- The hex equivalent appears instantly on the right
- Or enter a hex value to get decimal
- Use 0-9 and A-F for hex input
🎯 Use cases
When to use
- CSS color codes (#FF5733)
- Memory addresses and debugging
- MAC address formatting
- Assembly language programming
Frequently Asked Questions
Why is hex used in computing?▾
Each hex digit maps to exactly 4 binary bits. So a byte (8 bits) is always 2 hex digits, making hex a compact, readable shorthand for binary data.
What does 0x mean before a hex number?▾
The "0x" prefix is a convention in programming (C, JavaScript, Python) to indicate that the following number is in hexadecimal format. For example, 0xFF = 255 in decimal.