Home Math & Calculator Tools Hex to Decimal Converter
FF
Math

Hex to Decimal Converter

Convert hexadecimal numbers to decimal (and binary, octal) with full step-by-step positional breakdown. Supports 0x prefix, uppercase and lowercase hex, colour hex codes (#RRGGBB → RGB), and batch conversion.

⚡ Instant convert📋 Step-by-step🎨 Hex colour → RGB🔢 Batch mode
Switch Tool:
🔒 100% Private — All calculations run in your browser. Nothing is sent to any server.
0x prefix, # prefix, uppercase & lowercase all accepted · One per line for batch
Enter a hex number to convert…

📖How to Use the Hex to Decimal Converter

  1. 1
    Enter a hex number

    Type a hexadecimal value — with or without 0x prefix. Uppercase (A–F) and lowercase (a–f) are both accepted. For colour hex codes, enter #RRGGBB to see the RGB breakdown. For batch mode, enter one hex value per line.

  2. 2
    View the decimal result with steps

    Each hex digit is multiplied by its power of 16 and summed. The step-by-step panel shows: hex digit → decimal value → power of 16 → product, then the final sum. Results also show the binary and octal equivalents.

  3. 3
    Copy or use the result

    Click Copy to copy the decimal value. The colour preview (for hex colour codes) shows the actual colour swatch alongside the RGB values. Batch results are shown in a table and can be downloaded as CSV.

💡Quick Reference

HexDecimal
0F15
FF255
100256
FFFF65,535
7FFFFFFF2,147,483,647

Frequently Asked Questions

How do you convert hex to decimal?

Hexadecimal is base-16, using digits 0–9 and letters A–F (where A=10, B=11, C=12, D=13, E=14, F=15). To convert to decimal: multiply each hex digit by 16 raised to its positional power (starting from 0 on the right), then sum the results. For example: 2AF hex = (2×16²) + (10×16¹) + (15×16⁰) = 512 + 160 + 15 = 687 decimal. This tool shows every step.

Why do programmers use hexadecimal?

Hexadecimal is a compact way to represent binary data. Since 16 = 2⁴, each hex digit maps exactly to 4 binary bits. A byte (8 bits) is always exactly 2 hex digits. This makes memory addresses, colour codes, error codes, and machine instructions far more readable in hex than in binary. For example, the 32-bit value 11111111111111110000000000000000 in binary is simply FFFF0000 in hex.

What are hex colour codes?

Web and CSS colours are expressed as 6-digit hex codes: #RRGGBB, where RR, GG, and BB are the red, green, and blue channel values (0–255) in hexadecimal. For example, #FF0000 = red (255, 0, 0), #00FF00 = lime green (0, 255, 0), #FFFFFF = white (255, 255, 255), #000000 = black (0, 0, 0). This converter decodes any hex colour code and shows the RGB values and a colour preview swatch.

What is the 0x prefix?

The 0x prefix (e.g. 0x1A3F) is a notation convention used in programming languages (C, C++, Java, Python, JavaScript) to indicate that a number is hexadecimal rather than decimal. This converter accepts hex values with or without the 0x prefix, and with or without the # prefix used in HTML/CSS colour codes.

How do I convert hex to binary?

The conversion is direct: each hex digit corresponds to exactly 4 binary bits. A–F correspond to 1010 through 1111. For example: hex 3A = binary 0011 1010 (3=0011, A=1010). This direct mapping is why hex is preferred over decimal for representing binary data — it is compact and each digit maps cleanly to a fixed number of bits.

What are common hex values in computing?

0xFF = 255 (max byte value), 0x00 = 0, 0x7F = 127 (max signed byte), 0x80 = 128 (min negative signed byte), 0xFFFF = 65535 (max 16-bit value), 0x100 = 256, 0x400 = 1024 (1 KB). Memory addresses, ASCII character codes, and CPU instruction codes are all commonly expressed in hexadecimal in documentation and debugging tools.