Decimal to Hex Converter
Type any decimal number and instantly see its hexadecimal, binary, and octal equivalents.
Last updated: May 30, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is Decimal to Hex Converter?
Decimal is the familiar base-10 number system (digits 0–9) that we use in everyday life. Hexadecimal (hex) is the base-16 system that uses digits 0–9 and letters A–F (A=10, B=11, C=12, D=13, E=14, F=15).
Hex is preferred in programming and computing for several reasons: - One hex digit represents exactly 4 binary bits (a "nibble"), making hex a compact shorthand for binary. - Two hex digits represent exactly 8 bits (one byte), so 255 decimal = FF hex = 1 byte at maximum value. - Memory addresses, colour codes, and cryptographic hashes are traditionally displayed in hex.
Common uses for decimal-to-hex conversion: - CSS colours: each RGB channel ranges from 0–255 (decimal) → 00–FF (hex). So rgb(255, 144, 30) = #FF901E. - Memory addresses: 0xDEADBEEF = 3,735,928,559 decimal. - Network packet values displayed in Wireshark or hex editors.
How to Use Decimal to Hex Converter
Type or paste a decimal number into the input field
The hexadecimal, binary, and octal equivalents appear instantly
Click any "Copy" button to copy a specific result
Click "Load Sample" to see the classic 255 → FF example
Common Use Cases
- Converting RGB colour component values (0–255) to two-digit hex codes for CSS (#RRGGBB).
- Reading memory dumps: converting a decimal address to the hex address shown in a debugger.
- Understanding network protocol byte values by converting decimal to hex.
- Encoding ASCII character codes as hex escape sequences (\xFF).
- Converting decimal port numbers or error codes to hex for protocol documentation.
- Checking that a decimal hash value matches an expected hex value in security tools.
Example Input and Output
The decimal number 255 (maximum byte value) converts to FF in hex, 11111111 in binary, and 377 in octal.
255FF (hex) = 11111111 (binary) = 377 (octal)Privacy
All conversions run in your browser using JavaScript BigInt. No data is sent to any server.
Hex and CSS colours
To build a CSS hex colour from RGB values: convert each of the three decimal values (0–255) to two hex digits. Use this tool for each channel, then concatenate: R=255→FF, G=144→90, B=30→1E → #FF901E.

