Free online converter

Hex Converter

Convert hexadecimal values to decimal, binary and octal or choose another input base and convert that value to hexadecimal. Results use exact integer arithmetic and can be copied instantly.

Binary101010
Octal52
Decimal42
Hexadecimal2A

How to use the Hex Converter

  1. Choose the number base of the value you are entering.
  2. Enter a hexadecimal, decimal, binary or octal integer.
  3. Hexadecimal accepts 0 through 9 and letters A through F.
  4. A common 0x hexadecimal prefix or 0b binary prefix may be included.
  5. The tool converts the integer using BigInt arithmetic.
  6. The equivalent value is displayed in binary, octal, decimal and hexadecimal.
  7. Copy any result directly with its Copy button.

Examples

Hex 2A to decimal

Hexadecimal 2A equals decimal 42 because 2 × 16 + 10 = 42.

Hex FF to decimal

Hexadecimal FF equals decimal 255 and binary 11111111.

Decimal 4096 to hex

Decimal 4096 equals hexadecimal 1000.

Binary 101010 to hex

Binary 101010 equals hexadecimal 2A.

Frequently asked questions

What is hexadecimal?

Hexadecimal is a base-16 number system using digits 0 through 9 and letters A through F, where A represents 10 and F represents 15.

How do I convert hex to decimal?

Multiply each hexadecimal digit by its corresponding power of 16 and add the values.

Why is hexadecimal used in programming?

Hexadecimal represents binary values compactly. One hexadecimal digit corresponds to four binary bits, which makes byte and memory values easier to read.

Can I enter lowercase hexadecimal letters?

Yes. Lowercase and uppercase hexadecimal letters are accepted.

Does 0x mean hexadecimal?

Yes. In many programming languages and technical contexts, the prefix 0x indicates that the following number is hexadecimal.

Related tools

More converters tools