---
slug: hex-to-decimal-calculator
title: "Hex to Decimal Converter"
category: developer
updated: 2026-11-17
canonical: https://calcseed.com/c/developer/hex-to-decimal-calculator/
html: /c/developer/hex-to-decimal-calculator/
---

# Hex to Decimal Converter

Convert a two-digit hexadecimal value to its decimal equivalent. Free and instant.

## Quick answer

**Quick answer:** with the default inputs (15, 15), the decimal is **255**. Change any input to update the result.

## Default calculation

Values computed by this calculator at exactly the default inputs listed below.

### Inputs (defaults)

| Input | Value | Unit |
| --- | --- | --- |
| High hex digit | 15 |  |
| Low hex digit | 15 |  |

### Outputs at these defaults

| Output | Value | Unit |
| --- | --- | --- |
| Decimal | 255 |  |

## Formula

```text
decimal = (high digit × 16) + low digit
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| High hex digit | select |  | 15 |
| Low hex digit | select |  | 15 |

## Outputs

| Result | Format |
| --- | --- |
| Decimal | primary |
| Hex value | text |
| Decimal | number |

## How it works

### What the converter returns

Pick a high and a low hex digit and the tool builds the two-character hex byte and its decimal value. Both defaults are **F**, so the output is **FF** and **255**, the largest value a single byte can hold. Because the inputs are dropdowns rather than a text field, the value is always a legal pair of digits and always lands in the range 0–255.

### Two positions, two weights

Hexadecimal is base 16, so a two-digit value has only two weights: the left digit is worth its value times 16, and the right digit is worth its face value. There is no multiplication chain to track, which is why a byte converts faster by hand than a longer hex string.

Digits 0–9 keep their decimal value. The letters continue the sequence: A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15. The mapping matters because FF is not fifteen-fifteen; it is 15 × 16 + 15 = 255, and reading the letters as decimal digits is the fastest way to get a wrong answer.

| Hex digit | Decimal | Hex digit | Decimal |
| --- | --- | --- | --- |
| 0 | 0 | 8 | 8 |
| 1 | 1 | 9 | 9 |
| 2 | 2 | A | 10 |
| 3 | 3 | B | 11 |
| 4 | 4 | C | 12 |
| 5 | 5 | D | 13 |
| 6 | 6 | E | 14 |
| 7 | 7 | F | 15 |

A quick check on any byte: the decimal value equals 16 × high + low. For 7F that is 16 × 7 + 15 = 127, the largest signed positive value in a byte. For 80 it is 16 × 8 + 0 = 128, the first value that reads as negative in two&rsquo;s complement.

### Worked example: FF to 255

Both digits are F, so both are worth 15. Multiply the high digit by 16: 15 × 16 = 240. Add the low digit: 240 + 15 = 255. The hex output is FF and the decimal output is 255.

The reverse check confirms it. 255 ÷ 16 = 15 remainder 15, and 15 is F, so the two digits are F and F again. A byte has 256 values, 0 through 255, and FF sits at the top of that range simply because it is the largest pair of digits the alphabet allows.

Try a mixed pair next: DB. D is 13 and B is 11, so 13 × 16 + 11 = 208 + 11 = 219. That is the blue channel of the color #3498DB, and 219 is why the blue in that color looks bright rather than mid-range.

### Byte values worth knowing

| Hex | Decimal | What it often means |
| --- | --- | --- |
| 00 | 0 | Zero or a null terminator |
| 0F | 15 | All four low bits set |
| 10 | 16 | One full high-nibble step |
| 7F | 127 | Largest positive signed byte |
| 80 | 128 | First negative signed byte |
| A0 | 160 | Non-breaking space in Latin-1 |
| FF | 255 | All bits set, or -1 when signed |
| DB | 219 | High blue channel |

The 7F and 80 rows are the ones that cause bugs. An unsigned byte treats 80 as 128, while a signed byte treats it as −128. Reading a sensor or an audio sample with the wrong signedness flips every value above 127 to a negative number, and the data looks like noise rather than a signed range.

### Why two hex digits equal one byte

- Two hex digits give 16 × 16 = 256 combinations, exactly the number of values in a byte
- The high digit selects one of 16 blocks of 16 values, so each digit is a nibble, or half a byte
- Memory dumps, MAC addresses and RGB colors all group hex in pairs for this reason
- Extending to four digits gives 65,536 values, which is one 16-bit word, not one byte

The pairing is exact and has no remainder, which is why hex is the standard notation for binary data. A 32-bit integer prints as eight hex digits, a 64-bit integer as sixteen, and each pair maps cleanly onto one byte with no shifting or padding needed.

### Common mistakes

- Reading FF as decimal 15:15 or as 1515, when it is 255
- Treating A–F as invalid input, when they are the digits for 10–15
- Assuming case matters: ff and FF are the same byte and both equal 255
- Leaving the 0x prefix on the input, which is notation for source code rather than part of the value
- Forgetting signedness, so 80 reads as 128 unsigned but −128 signed
- Splitting a three-digit hex value into a byte and a leftover digit, when three digits span 12 bits

#### Signed bytes and two&rsquo;s complement

A byte has no inherent sign; the type that reads it decides. If a language declares the value as signed 8-bit, FF is −1, FE is −2 and 80 is −128. The conversion to decimal is unchanged, 255, but the interpretation subtracts 256 once the top bit is set. That is why a checksum printed as FF sometimes shows up as −1 in a debugger.

### Where hex bytes show up

Color codes are the most common encounter: #3498DB splits into 34, 98 and DB, which are 52, 152 and 219 as decimal channels. Network masks and MAC addresses split the same way, one pair per octet. File signatures, the magic bytes at the start of a file, are usually quoted in hex for the same reason: two characters per byte keeps the offsets aligned with the digits.

#### Hex versus decimal in one line

Decimal compresses a byte into three characters at most, 255, while hex always uses exactly two, FF. Neither is shorter on average, but hex keeps a fixed width and aligns by byte, which makes columns line up in a memory dump. That alignment, not compactness, is the reason low-level tools prefer it.

### Exact arithmetic, no rounding

Every value in this tool is a small integer, so the result is exact with no floating-point step. The only way to get a wrong answer is to misread the digits. If you extend the same method to four or eight hex digits, the arithmetic stays exact until 2^53, which is reached at 13 hex digits; above that, use integer or BigInt types rather than a double.

## FAQ

### How do I convert hex to decimal?

Multiply the left digit by 16 and add the right digit. For FF that is 15 × 16 + 15 = 255.

### What do A through F mean?

They stand for the decimal values 10 through 15. A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15.

### Why is FF equal to 255?

Each F is 15, so FF is 15 × 16 + 15 = 255, the maximum value of one unsigned byte.

### What is hex 80 in decimal?

128 as an unsigned byte, or −128 if the byte is read as signed. The digits give 8 × 16 + 0 = 128 either way; only the interpretation changes.

### What is hex 7F in decimal?

127, which is the largest positive value a signed byte can hold. It is 16 × 7 + 15, and the next value, 80, flips to negative.

### Does hex letter case matter?

No. ff, Ff and FF all convert to 255. This tool prints uppercase for consistency, but the value is identical.

### How many decimal values fit in two hex digits?

256, from 00 to FF, which is 0 to 255. That is exactly one byte, and it is why hex is written in pairs.

### What is hex DB in decimal?

219. D is 13 and B is 11, so 13 × 16 + 11 = 208 + 11 = 219, the blue channel of #3498DB.

### Why does my debugger show FF as -1?

It is reading the byte as signed. 255 exceeds the signed maximum of 127, so the value wraps to 255 − 256 = −1 in two&rsquo;s complement.

## Method and sources

Methodology: Conversions and formats follow the relevant IETF RFCs and IEEE standards, including RFC 4648 for Base64 and RFC 791 for IPv4 addressing.

Last updated: 2026-11-17.
- Hexadecimal is base 16; digits 0–9 and A–F.
