Decimal to Hexadecimal Converter

Type a Decimal number and get Hexadecimal instantly — plus every other base at the same time.

Every base updates as you type; click bits to toggle them. Digit separators (_, spaces) are allowed. In two's complement mode the binary/octal/hex rows show the bit pattern and the decimal row shows the signed value. Choose Text to convert ASCII/UTF-8 text to bytes in any base — or bytes back to text.

How to convert Decimal to Hexadecimal

To convert decimal to hexadecimal, divide the number by 16 repeatedly, writing down the remainder each time, until the quotient reaches zero. The remainders, read from the last to the first, are the hexadecimal digits.

Worked example

Convert 1958 (decimal) to hexadecimal:

  1. 1958 ÷ 16 = 122, remainder 6
  2. 122 ÷ 16 = 7, remainder A
  3. 7 ÷ 16 = 0, remainder 7
  4. Read the remainders bottom-up: 7A6

So 1958 in decimal is 7A6 in hexadecimal.

Decimal to Hexadecimal conversion table

DecimalHexadecimal
00
11
22
33
44
55
66
77
88
99
10A
11B
12C
13D
14E
15F

Frequently asked questions

Can this handle numbers larger than 64 bits?
Yes. Conversion runs on arbitrary-precision integers, so numbers of any length convert exactly. Many online converters silently lose precision above 2⁵³ (about 16 decimal digits) — this one doesn't.
How do I convert negative numbers?
A leading minus sign works in every base. For the bit-pattern view programmers usually want, switch the mode to two's complement at 8, 16, 32, or 64 bits — then binary, octal, and hex show the bit pattern while decimal shows the signed value.
Can I convert the other way, or to other bases?
Use the Hexadecimal to Decimal converter, or just change the From/To dropdowns above — every common base is shown at once anyway, and a Text mode converts ASCII to bytes and back.

Need arithmetic rather than conversion — adding hex numbers, shifting bits, masking? Use the programmer's calculator.