Skip to content
CalcWorld

Browse all tools

Hex Converter

The hex converter changes numbers between hexadecimal, decimal, binary and octal in ten directions and shows the calculation steps. 1F in hex is 1 × 16 + 15 = 31 in decimal, and 255 in decimal is FF.

Sources: Wikipedia Updated

Instructions:
  • Select the conversion type from the dropdown menu
  • Enter the value you want to convert (without prefixes like 0x)
  • For hexadecimal: use 0-9 and A-F (case insensitive)
  • For binary: use only 0 and 1
  • For octal: use only 0-7
  • For decimal: use 0-9 (integers only)

Ten conversion directions in one box

The menu offers ten directions: hex to and from decimal, hex to and from binary, decimal to and from binary, hex to octal, decimal to and from octal, and octal to hex. The tool checks your input against the digits of the source base before converting.

A G fails hex, and an 8 fails octal, which only uses 0 to 7. For any base from 2 to 36, use the base converter.

How to convert hexadecimal to decimal

Select Hexadecimal → Decimal and enter 1F. Each hex digit is worth a power of 16.

  1. Give each digit its power of 16 from the right: F is in the 16⁰ = 1 place, 1 is in the 16¹ = 16 place.
  2. Turn letters into numbers and multiply: F = 15, so 15 × 1 = 15, and 1 × 16 = 16.
  3. Add the results: 16 + 15 = 31.

The tool lists the same digit-by-digit breakdown before the total. The hex to decimal converter works through more examples, including colour codes.

Place value table for hex 1F: place values 16 and 1, digits 1 and F (15), worth 16 and 15. The sum 16 + 15 = 31.
Hex digits above 9 are letters: F stands for 15.

How to convert decimal to hexadecimal

Select Decimal → Hexadecimal and enter 255. Divide by 16: 255 ÷ 16 = 15 remainder 15 (F), then 15 ÷ 16 = 0 remainder 15 (F). Read from the last remainder to the first, the answer is FF.

255 is the largest value of one byte, 2⁸ − 1, and FF is how that maximum is written in hex: white is #FFFFFF in web colours. The decimal to hexadecimal converter shows the division for larger numbers such as 500 = 1F4.

Why hex, octal and binary convert so easily

Binary, octal and hexadecimal are all powers of 2: 2¹, 2³ and 2⁴. So one octal digit is exactly 3 bits and one hex digit is exactly 4 bits, and conversions between them are just regrouping.

Decimal shares no such link with binary, so decimal conversions use repeated division instead. The hex to binary converter shows the four-bit grouping, and the binary to octal converter the three-bit one.

Input rules

The tool does not guess the base you typed. Pick the right source base in the menu, or valid-looking input can be rejected. Every conversion tool is listed on the number system converters page.

Hex Converter: FAQ

What is FF in decimal?

255: 15 × 16 + 15. It is the largest value of one byte, which is why colour channels run from 00 to FF.

How do I convert hex to octal?

Go through binary: write each hex digit as 4 bits, regroup the bits in threes from the right and write each group as an octal digit. FF = 1111 1111 = 11 111 111 = 377.

Why does my input get rejected?

The source base in the menu decides which digits are allowed. 19 fails under Binary → Decimal, because 9 is not a binary digit, and G fails under any hex option.

Sources

  • Wikipedia: Hexadecimal — hex digits, powers of 16 and conversion to binary (checked October 16, 2026)
  • Wikipedia: Octal — octal digits and their link to groups of three bits (checked October 16, 2026)