Converters

Convert hex to decimal

Hex to decimal converter reads a base-16 number and prints its base-10 value. Front-end developers use it on CSS color channels, where FF is a full red byte, and debugging sessions convert memory addresses and error codes from logs. Input may be upper or lowercase, with or without a 0x prefix, and negatives work: -ff prints -255. Results are exact at any length, and one number per line converts a whole column at once.

How to use Hex to Decimal

  1. Open Hex to Decimal in the Toolbox101 app.
  2. Type or paste a hex value such as FF, with or without 0x, upper or lowercase, into the Hex number box. Several are fine, one per line.
  3. Read the decimal result in the Output box; it updates as you type.
  4. Click Copy to keep the value for your CSS, config or debug notes.

Worked example

Hex to Decimal returns the output below for this input.

Input

FF

Output

255

Check it yourself: open Hex to Decimal and enter the same input.

Frequently asked questions

Do I need to include the 0x prefix?

No. 0xFF, 0xff and FF all print 255, because a leading 0x is recognised and dropped before the digits are read. Paste the value exactly as it appears in your log or code.

Can it convert negative or fractional hex?

Negative whole values work: -ff prints -255. Fractions do not: a . is reported as an invalid hexadecimal digit rather than silently cutting the number short. For a radix-point hex value, convert the integer and fractional parts separately and combine the decimal results yourself.

How do I check a hex to decimal result by hand?

Multiply each digit by its place value in base 16 and add. For FF that is 15 times 16 plus 15, which is 255. Or paste 255 into the Decimal to Hex tool here and confirm it prints FF back, checking the reverse direction the same way.

What is the difference between hex to decimal and hex to text?

They treat the input differently. Hex to decimal reads the whole string as one number, so FF is 255. Hex to text splits the string into pairs and prints the character each pair encodes, so 68656C6C6F reads as the word hello. Use the text tool when your hex is byte data rather than a single numeric value.

Use Hex to Decimal now

Runs in your browser. Nothing you type is uploaded.