Skip to content
cubdomaincubdomain

Decimal to Hex Converter

Convert numbers between decimal, hexadecimal, binary and octal.

decimal255
hexadecimalFF
binary1111 1111
octal377

How to use it

  1. 01

    Enter a number

    For example 255.

  2. 02

    Choose the input base

    Decimal, hex, binary or octal.

  3. 03

    Copy any result

    All four bases update together.

Questions

How do I convert decimal to hex by hand?

Divide by 16 repeatedly and read the remainders backwards, using A–F for 10–15.

What does 0x mean?

A prefix programmers use to show a number is hexadecimal, like 0xFF.

Why is hex used for colours?

Each pair of hex digits is one byte (0–255), so #FF8800 maps neatly to red, green and blue.