Part of the Maths & Statistics suite · 235 calculators

Decimal to Hex Converter

Convert a decimal number to hexadecimal — the compact base-sixteen form used for colours, bytes and addresses.

Divide repeatedly by sixteen and read the remainders backwards, using A to F for ten to fifteen.

Results update as you type
Results
Converted
FF
Decimal value
Binary
Octal
Hexadecimal
Bits needed
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows the Australian Curriculum (maths, brackets, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About decimal to hex converter

How the decimal to hex converter works

Divide repeatedly by sixteen and read the remainders backwards, using A to F for ten to fifteen. Because two hex digits hold exactly one byte, values are usually padded to an even length — 15 is written 0F rather than F when it represents a byte.

Formula: value = Σ digitₖ × bᵏ

Worked examples

InputsConvertedNote
255FFFF
409610001000
3405691582CAFEBABECAFEBABE

Frequently asked questions

How do I convert decimal to hex?

Divide by sixteen repeatedly and read the remainders backwards, writing 10–15 as A–F.

What is 255 in hex?

FF.

Why pad to two digits?

Because two hex digits are exactly one byte, so 15 becomes 0F when it stands for a byte value.

How do I write a colour?

Three bytes, red then green then blue: pure orange is #FF8800.

Is hex case-sensitive?

No — FF and ff mean the same. Upper case is the more common convention.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.