Decimal to Hexadecimal Converter

developer · number system

Convert Decimal to Hexadecimal with a fixed input and output format, step-by-step formulas under the result, and reference tables. Parsing matches the main hub (0b, 0x, leading 0 for octal; one optional . for fractional digits on numeric bases; single character for character mode).

Calculator

From: Decimal

To: Hexadecimal

Formulas

Enter a value → place-value expansion + division chain.

About Decimal

Decimal (base 10) uses digits 0–9; no prefix is required. A single . may separate the fractional part (10⁻¹, 10⁻², …). Values are parsed to a number and re-encoded into the target format; very long fractions are limited by floating-point precision.

About Hexadecimal

Hexadecimal (base 16) uses 0–9 and A–F. This tool accepts an optional 0x prefix. One radix point is allowed; fractional digits use 16⁻¹, 16⁻², …. Each hex digit covers four bits, so it is compact for memory addresses, colors, and byte dumps.

How to convert decimal to hexadecimal

Three steps: symbols → the right math move for this pair → worked examples you can copy on paper. Numeric bases (binary, octal, decimal, hex) also support one radix point and digits after it; character mode stays a single code unit.

Step 1 — Identify the symbols

Input (Decimal): Ordinary digits 0–9; each position is a power of ten.

Output (Hexadecimal): Digits 0–9 plus letters A–F for values ten through fifteen.

Hex conversions use this letter-to-number map:

Hex digit → value (for place weights)
DigitValueDigitValue
0088
1199
22A10
33B11
44C12
55D13
66E14
77F15
Dev note
  • 0x is a common prefix (e.g. 0xFF).

Step 2 — Repeated Division by 16

Repeated division by 16: each remainder is one hex digit; values 10– 15 become A–F. Read remainders from last step to first.

Fractional decimal values: convert the whole part with repeated division, then multiply the fractional part by the target base over and over; each integer you get is the next digit after the radix point (same idea the calculator shows in Formulas).

Step 3 — Worked examples

Two practice values in Decimal, converted to Hexadecimal using the same rules as Step 2. Example 3 uses a fractional part (digits after the radix point); the hub and pair calculators accept a single . on binary, octal, decimal, and hex inputs.

Example 1

"26" (Decimal) → Hexadecimal.

From decimal

N₁₀ = 26

Whole part — repeated division:
26 ÷ 16 = 1  R 10 (A)
1 ÷ 16 = 0  R 1

Read remainders bottom → top → 1A

→ tool: 0x1a

Verify: "26"0x1a

Example 2

"100" (Decimal) → Hexadecimal.

From decimal

N₁₀ = 100

Whole part — repeated division:
100 ÷ 16 = 6  R 4
6 ÷ 16 = 0  R 6

Read remainders bottom → top → 64

→ tool: 0x64

Verify: "100"0x64

Example 3

"10.625" (Decimal) → Hexadecimal.

From decimal

N₁₀ = 10.625

Whole part — repeated division:
10 ÷ 16 = 0  R 10 (A)

Read remainders bottom → top → A

Fractional part — multiply by 16, integer of each product = next digit after .
  0.625×16 = 10  →  A
Digits after . (in order): .A

→ tool: 0xa.a

Verify: "10.625"0xa.a

Summary

To convert Decimal to Hexadecimal, the tool first parses your input strictly as decimal, producing a decimal value. For binary, octal, decimal, and hex, you may include one radix point and fractional digits; character input remains a single code unit with no dot. That value is formatted as hexadecimal using the same rules as the main Number System Converter (prefixes 0b, 0, 0x where applicable; character output uses symbolic names for common controls and requires a whole-number code point). Long fractional expansions are truncated to a fixed digit cap; ordinary floating-point rounding may appear in extreme cases.

Relationship context

Decimal, Hexadecimal, and the other numeric bases on this site all describe the same numeric value; only the radix changes (including optional fractional digits after one dot). Moving between them is equivalent to changing how the value is written, not to scaling or unit conversion. Binary, octal, and hex align with bit boundaries (powers of two), while decimal is optimized for human arithmetic.

Conversion tables

Decimal (input)Hexadecimal (output)
00
10x1
20x2
30x3
40x4
50x5
60x6
70x7
80x8
90x9
100xa
150xf
160x10
Decimal (input)Hexadecimal (output)
110xb
320x20
640x40
1280x80
2560x100
5120x200
10240x400
20480x800
40960x1000
81920x2000
163840x4000
327680x8000
655350xffff

More number system pairs

Other fixed input/output converters use the same parsing rules as the hub. Open any pair for the same calculator layout and reference tables.