Hex to Decimal Converter - Free, With Steps

Hex to Decimal Converter

Convert hex to decimal and back with exact results, signed values, fractions and batch lists.

Accepts 0x, #, $, \x and h-suffix styles, upper or lower case, spaces or underscores between digits, a leading minus and one point for fractions (1A.8). Up to 10,000 digits.

Try an example
Reference: hex digits 0 to F
Hex Decimal Binary
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111

This hex to decimal converter turns any hexadecimal value, such as FF, 0x7FFFFFFF or #FF8800, into an exact decimal number. It is made for programmers, students and designers. It also shows binary, octal, signed values, byte order and a step-by-step breakdown. A second tab converts decimal back to hex.

What Is Hexadecimal to Decimal Conversion?

Hexadecimal to decimal conversion rewrites a base-16 number as a base-10 number. Hex uses sixteen symbols: the digits 0 to 9 and the letters A to F, where A is 10 and F is 15. Each position is worth a power of 16, so reading from the right the places are worth 1, 16, 256, 4,096 and so on.

To convert by hand, multiply each digit by 16 raised to its position, then add the products. For 2F, that is 2 × 16 + 15 × 1 = 47. Programmers like hex because one hex digit equals exactly four bits, so two digits describe one byte.

Hex digitDecimalBinary
A101010
B111011
C121100
D131101
E141110
F151111

How to Use the Hex to Decimal Converter

You can convert a hex value in a few clicks: enter the value, pick how to read it, and copy the result. Follow these steps.

  1. Select the Hex to Decimal tab at the top of the tool.
  2. Type or paste your number into Hex value. You can use 0x, #, $, x or h-suffix styles, upper or lower case, and spaces or underscores between digits (DEAD_BEEF works). A leading minus sign and one point for fractions (1A.8) are also accepted.
  3. Or tap one of the example buttons, such as FF, 0x7FFFFFFF, FFFFFFFFFFFFFFFF, 1A.8, -1F, #FF8800, 0x1234 or DEAD_BEEF.
  4. Under Interpretation, choose Unsigned or Two's complement (signed). For signed values, set the Bit width: Auto (4 bits per digit), 8, 16, 32, 64, 128 or Custom (1 to 4096 bits).
  5. Read the Decimal result and press Copy. Switch Thousands separators and Group binary in nibbles on or off to match how you want the output formatted.
  6. To convert a list, tick Batch mode (one value per line) and paste up to 1,000 lines. Blank lines are skipped.
  7. Open the Step by step table to see each Position, Digit, Value, Place value and Product that adds up to the answer.

Worked Examples: What Does the Converter Return?

The examples below show how the same hex digits can produce different decimal numbers depending on the interpretation you choose.

FF and 10 and 20

Searchers often ask what FF is in decimal. FF is 15 × 16 + 15 = 255, the largest value of one byte. Hex 10 is 16 and hex 20 is 32, because the left digit counts groups of 16.

0x7FFFFFFF and FFFFFFFF

0x7FFFFFFF converts to 2,147,483,647, the largest signed 32-bit integer. FFFFFFFF converts to 4,294,967,295 when read as unsigned. Switch Interpretation to Two's complement with a 32-bit width and the same digits become -1, because the top bit is set and the value is 4,294,967,295 minus 232.

#FF8800 as a color

As a plain number, FF8800 is 255 × 65,536 + 136 × 256 + 0 = 16,746,496. The tool also notes that the value can be read as a CSS color, which here is rgb(255, 136, 0), a bright orange.

1A.8 with a fraction

Digits after the point are worth 1/16, 1/256 and so on. For 1A.8: 1 × 16 + 10 = 26, plus 8 ÷ 16 = 0.5, so the result is 26.5.

0x1234 and byte order

0x1234 is 1 × 4,096 + 2 × 256 + 3 × 16 + 4 = 4,660. The little-endian value reverses the bytes (12 34 becomes 34 12), which gives 0x3412, or 13,330 in decimal.

How Do You Read and Act on the Results?

Each output line answers a different question, so pick the one that matches your task.

  • Decimal: the exact base-10 value. The "Read as" note tells you whether it was treated as unsigned or signed.
  • Signed decimal (two's complement): appears when you choose signed mode. If it looks wrong, check the bit width. 0xFF is -1 at 8 bits but 255 at 16 bits, because 0x00FF has a clear top bit.
  • Binary and Octal: useful for checking flags and permissions. Nibble grouping makes 11111111 easier to read as 1111 1111.
  • Bytes (big-endian) and Little-endian value: the byte view needs whole bytes, meaning an even number of digits, up to 16 bytes. Add a leading 0 to a value like 123 to make it 0123.
  • Hex digits, Bit length and Bytes needed: tell you how much space the number occupies, for example when choosing a 16-bit or 32-bit field.
  • Also a colour: shows a swatch for six or eight digit values, with copy buttons for rgb and rgba.

How Do You Convert Decimal to Hex?

Switch to the Decimal to Hex tab, enter a number in Decimal number (or one per line in batch mode) and read the hex result. You can add a 0x prefix, choose Uppercase (FF) or Lowercase (ff), and pad with zeros to 2, 4, 8, 16 or 32 digits for 8, 16, 32, 64 or 128-bit fields.

Fractions are supported, with a Fraction digits setting from 1 to 256. For negative numbers, choose between a minus sign (-FF) and two's complement, with Auto (whole bytes) or a fixed bit width. For example, -1 in 8-bit two's complement is FF.

Who Uses a Hex to Decimal Converter?

The tool fits any job where hex values come from one system and decimal values from another.

  • Developers reading memory addresses, error codes, register values and hash fragments in logs.
  • Students checking homework, with the step-by-step table showing the full working.
  • Web designers turning color codes like #00FF00 into RGB numbers.
  • Network and embedded engineers reading packet bytes, where the big-endian and little-endian views save manual flipping.
  • Spreadsheet users converting a column of IDs in one paste with batch mode.

If you need arithmetic on hex values rather than conversion, the hex calculator adds, subtracts and applies bitwise operations. To see the same number in base 2, the binary calculator is a good companion.

Best Practices, Common Mistakes and Troubleshooting

Choose signed or unsigned on purpose

Hex has no sign of its own. FFFE is 65,534 as unsigned 16-bit and -2 as signed 16-bit. Decide which one your data format uses before you copy a number into code.

Watch for invalid characters

Hex only allows 0 to 9 and A to F. A letter like G or O triggers an error that points to the character's position. Only one point is allowed, so 1A.8.4 is rejected. Commas inside a value are also flagged.

Fix a value that does not fit the bit width

If you pick 8-bit and enter 1FF, the value needs 9 bits, so the tool asks you to choose a wider width. Increase the width or use Auto.

Keep leading zeros in mind

In Auto mode each digit counts as four bits, so 00FF is 16 bits wide while FF is 8. This changes the signed result, so keep the zeros your source data has.

Check spreadsheet and script limits

Excel's HEX2DEC function accepts up to 10 hex characters. Python's int("ff", 16) returns 255 for any length but does not show steps. Use this page when you need long values, a signed reading or the working.

Match endianness to your source

A network capture usually lists bytes in the order sent, while a CPU register dump may show them reversed. Compare both byte views with the number you expect before trusting either.

Limits to Keep in Mind

A single value can have up to 10,000 hex digits, and batch mode accepts up to 1,000 lines. The step-by-step table is meant for shorter values, so very long inputs show the result without a full breakdown. Colors only apply to six or eight digit values. The converter works with numbers, not text. To turn character codes into readable words, use the decimal to ASCII converter or the binary translator.

Paste your value above to get the exact decimal, the signed reading and the working in one step. Related utilities are collected in the online calculators and utilities hub.

Frequently Asked Questions

How do I convert hex to decimal by hand?
Multiply each hex digit by 16 raised to its position, counting from 0 on the right, then add the results. For 2F, 2 × 16 + 15 = 47. The Step by step table in this converter shows the same working for your own value.
What is FF hex to decimal?
FF in hex equals 255 in decimal. It is calculated as 15 × 16 + 15 × 1. This is the highest value one byte can hold. Hex 10 is 16 and hex 20 is 32.
Can this converter handle negative hex numbers?
Yes, in two ways. Type a leading minus sign, such as -1F, or choose Two's complement (signed) and set a bit width. With 8 bits, FF reads as -1, while unsigned it reads as 255.
Which hex formats does the converter accept?
It accepts 0x, #, $, x and h-suffix styles, in upper or lower case. You can separate digits with spaces or underscores, as in DEAD_BEEF, and add one point for fractions such as 1A.8. A single value can have up to 10,000 digits.
Why is my signed decimal result different from what I expected?
The bit width is usually the cause. FF is -1 at 8 bits but 255 at 16 bits, where it is 00FF. Pick the width your data format uses, or leave it on Auto, where each digit counts as four bits.
Is the hex to decimal converter free, and can I convert many values at once?
Yes, it is free and needs no sign-in. Tick Batch mode to paste one hex value per line, up to 1,000 lines, and convert them together. You can also switch to the Decimal to Hex tab to convert numbers back.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now