Decimal to Hex Converter

Convert signed decimal whole numbers to hexadecimal, with the reverse HEX-to-decimal direction available when you need to check a result.

Last updated: August 2026 | By Workshelve Team

Quick Select

Enter a value to convert

Exact whole integers

The converter keeps integer precision by converting validated digit strings with BigInt instead of routing the whole value through a floating-point Number.

Base 10 → base 16

Decimal uses ten digit symbols. Hexadecimal uses sixteen: 0–9 followed by A–F for values ten through fifteen.

Useful boundaries

Values such as 15, 16, 255, 256, 4095, and 4096 show exactly where an extra hexadecimal digit becomes necessary.

How Decimal Becomes Hexadecimal

Decimal is base 10, so each position represents a power of 10. Hexadecimal is base 16, so its positions represent powers of 16. The extra symbols A, B, C, D, E, and F stand for decimal values 10 through 15.

A standard hand-conversion method repeatedly divides the decimal integer by 16. Each remainder becomes one hexadecimal digit. Because the first remainder is the least-significant digit, you read the collected remainders from bottom to top when the division reaches zero.

For example, decimal 200 becomes C8: 200 ÷ 16 gives quotient 12 and remainder 8, and decimal 12 is the hexadecimal digit C. That makes the final value C8.

This page converts signed whole integers, so -255 becomes -FF. A leading minus sign represents the mathematical sign; the tool does not reinterpret negative values as a fixed-width two's-complement bit pattern, and it does not accept fractional notation.

Decimal to HEX Examples

10₁₀ → A₁₆
31₁₀ → 1F₁₆
200₁₀ → C8₁₆
1024₁₀ → 400₁₆
4096₁₀ → 1000₁₆
65535₁₀ → FFFF₁₆
-255₁₀ → -FF₁₆

Worked Example: 1000 Decimal to HEX

Repeated division by 16 produces the hexadecimal digits as remainders.

1000 ÷ 16 = 62 remainder 8
62 ÷ 16 = 3 remainder 14 → E
3 ÷ 16 = 0 remainder 3
Read the remainders upward:
1000₁₀ = 3E8₁₆

Decimal to HEX FAQs

Why does decimal 16 become 10 in hexadecimal?

Hexadecimal is base 16. After the single-digit values 0 through F, the next position is worth 16, so 10₁₆ means one sixteen plus zero ones.

Why do decimal-to-hex conversions use remainders?

Dividing by 16 separates the value into base-16 place values. Each remainder is the digit for the current least-significant position.

When does a hexadecimal result gain another digit?

An n-digit hex number can represent values up to 16ⁿ − 1. For example, FF ends at decimal 255, so decimal 256 becomes 100.

Does this converter round decimal fractions?

No. This tool is for signed whole integers, so an input containing a decimal point is rejected rather than rounded or truncated.

Can I convert a very large decimal integer?

Yes, within practical browser string limits. After validation, the signed integer is converted with BigInt so it is not restricted to Number safe-integer precision.

Why are hexadecimal letters shown in uppercase?

Uppercase A–F is a display convention on this page. The numeric value is the same if those six digits are written in lowercase.

Is decimal 255 always FF in every context?

As an unsigned integer value, yes: 255₁₀ and FF₁₆ denote the same magnitude. How a program stores or interprets that value can still depend on type and width.

What is the fastest way to sanity-check a decimal-to-hex result?

Check nearby powers of 16. For example, 256 is 100₁₆ and 4096 is 1000₁₆, which makes useful anchors for spotting an obviously misplaced digit.

Related Tools