Hexadecimal to decimal

Convert hexadecimal to decimal as you type, with any number of digits, the method step by step and a reference table.

loading Hexadecimal to decimal
About this tool

Hexadecimal and decimal

Hexadecimal (base 16) writes each group of 4 bits as one digit from 0 to F, so one byte is always two hex digits; it is the language of memory addresses, colors and hashes. Decimal (base 10) is the everyday system: each digit is worth a power of 10.

Hex shows up in error codes (0x80070005), memory addresses, HTTP/2 frames and colors; converting to decimal tells you the actual quantity.

This page opens the base converter with hexadecimal as the input; it shows binary, octal, decimal, hexadecimal and Base64 at once, accepts prefixes such as 0x, 0b and 0o, and works with numbers of any length (no 2^53 limit). It runs in your browser.

Hexadecimal vs decimal

Hexadecimaldecimal
Base1610
Digits0–9 A–F0–9
Prefix in code0x—
255 is writtenFF255

How to convert hexadecimal to decimal by hand

Multiply each digit by the power of 16 of its position (counting from 0 on the right) and add everything. For 9C:

9 × 16^1 + 12 × 16^0
= 144 + 12
= 156

Hexadecimal to decimal table

Values computed by the converter itself:

HexadecimalDecimal
00
11
22
77
88
A10
F15
1016
2032
4064
64100
7F127
FF255
100256
3E81000
4001024
10004096
FFFF65535

Hexadecimal to decimal in code

JavaScript

parseInt('9C', 16); // 156

Python

int("9C", 16)  # 156

For integers beyond 2^53 in JavaScript, use BigInt: BigInt("0x…").toString(10).

Frequently asked questions

Does it handle very large numbers?

Yes. The converter uses arbitrary-precision integers (BigInt), so a 256-bit hash or a 100-digit number converts exactly; JavaScript Number would lose digits above 2^53.

Can I convert negative numbers or fractions?

Negative integers keep their sign (-255 → -FF); the tool does not write two’s complement or fractional digits. For a two’s complement byte, add 256 first (−1 → 255 → FF).

Why do programmers use hexadecimal instead of binary?

Because it is binary in short form: 4 bits per digit, 2 digits per byte, so 0xFF is easier to read than 11111111 and still maps bit for bit.

Report a problem