Skip to content
CalculatorAtlas

Decimal to Hex Converter

Tested

Convert integers between binary, octal, decimal and hexadecimal.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

To convert decimal to hexadecimal, divide by 16 repeatedly and read the remainders from last to first. 255 = FF in hex, 11111111 in binary and 377 in octal.

Choose the input base, enter the value and read the other bases.

Related tools: Hex Calculator: Add, subtract or multiply hexadecimal numbers. Pixels Per Inch (PPI) Calculator: Pixel density of a display. Hex to Text Converter: Decode hexadecimal bytes as UTF-8 text.

How to use the Decimal to Hex Converter

  1. Choose input base: Decimal (10), Binary (2), Octal (8) and Hexadecimal (16).
  2. Type value, for example 255 or FF.
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Decimal to Hex Converter
InputWhat to enterAllowed values
Input baseChoose one: Decimal (10); Binary (2); Octal (8); Hexadecimal (16)Starts at Decimal (10)
ValueText, such as 255 or FF—

Formula and method

Formula

Σ dᵢ × baseⁱ

IEEE-754 double precision; shown to at most 6 decimal places.

BigInt parsing and printing, so large integers stay exact. Non-negative integers only.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Input base = Decimal (10); Value = 255.

Results of example 1
ResultValue
HexadecimalFF
Binary11111111
Octal377
Decimal255

Example 2

Inputs: Input base = Binary (2); Value = 1010.

Results of example 2
ResultValue
HexadecimalA
Binary1010
Octal12
Decimal10

Example 3

Inputs: Input base = Decimal (10); Value = 18446744073709551616.

Results of example 3
ResultValue
Hexadecimal10000000000000000
Binary10000000000000000000000000000000000000000000000000000000000000000
Octal2000000000000000000000
Decimal18446744073709551616

The first line is the headline result (hexadecimal). Below it the decimal to Hex Converter lists binary, octal and decimal, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.

By hand

255 ÷ 16 = 15 remainder 15, and 15 ÷ 16 = 0 remainder 15. Both remainders are 15, written F, so 255 is FF. In reverse: F × 16 + F = 255.

Where hex appears

Hex is used for colours (#FF0000), memory addresses and byte values because two hex digits describe one byte exactly.

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Value: entering "102" shows "Use only valid base-2 digits (up to 64)." beside that field and no result.

Choosing between the Decimal to Hex Converter and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Decimal to Hex Converter and similar calculators
CalculatorYou enterIt returns
[Hex Calculator](/technology/hex-calculator/)first hex number, second hex number and operationResult
[Pixels Per Inch (PPI) Calculator](/technology/pixels-per-inch/)horizontal pixels, vertical pixels and diagonal sizePixel density
[Hex to Text Converter](/technology/hex-to-text/)hex bytesText
[Tip Calculator](/finance/tip-calculator/)bill amount, tip and split betweenTip
[Discount Calculator](/finance/discount-calculator/)original price and discountFinal price

Assumptions and limitations

  • Digits must be valid for the base
  • Up to 64 digits

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for value to confirm this.

Frequently asked questions

What is 100 in hex?

100 in decimal is 64 in hexadecimal (6 × 16 + 4).

How do I read A to F?

The letters A to F stand for 10 to 15 in hexadecimal digits.

Is 0x prefix needed?

No. Enter the digits only; 0x is a programming-language prefix, not part of the value.

What does the Decimal to Hex Converter calculate?

Convert integers between binary, octal, decimal and hexadecimal. It returns Hexadecimal, Binary, Octal and Decimal.

What formula does the Decimal to Hex Converter use?

Σ dᵢ × baseⁱ. BigInt parsing and printing, so large integers stay exact.

What do I need to enter in the decimal to Hex Converter?

You enter Input base and Value.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. Digits must be valid for the base.

What are the limits of this converter?

Digits must be valid for the base. Up to 64 digits.

What does the “Input base” option change?

It sets how the decimal to Hex is worked out. The choices are Decimal (10), Binary (2), Octal (8) and Hexadecimal (16).

What is an example of a decimal to Hex result?

With input base Decimal (10) and value 255, the hexadecimal is FF.

Sources

  • OpenStax, University Physics Volume 1 (Rice University): mechanics

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.