J-Kit
Português

decimal to hexadecimal

Decimal to Hexadecimal Converter

Decimal to hex with 0x prefix. Each hex digit represents 4 bits — the standard format for CSS colors and memory addresses.

Why hex is so common in programming

  • Hexadecimal is a compact way to represent binary: 8 bits (1 byte) fit in just 2 hex digits. 255₁₀ = FF₁₆.
  • CSS RGB colors use hex: #RRGGBB, where each component ranges from 00 to FF (0 to 255 in decimal).

Examples

CSS white

Input
16777215₁₀
Expected output
0xFFFFFF

Pure white in RGB.

HTTP port

Input
8080₁₀
Expected output
0x1F90

Alternate HTTP port in hex.

Full tool FAQ

Converting a number between bases means representing the same value using a different set of digits. A decimal (base 10) number can be expressed exactly in binary (base 2), hexadecimal (base 16), or any other base.

Frequently asked questions

Is the 0x prefix included?

Yes. The default output includes the 0x prefix for hexadecimal.

Are hex letters upper or lowercase?

The tool uses uppercase letters (A–F) in the hexadecimal output.