Decimal to Hex Converter

Use this decimal to hex calculator to convert base-10 integers into hexadecimal with step-by-step division by 16, signed 32/64-bit registers, endian bytes, and 24-bit RGB color preview.

Presets:
9 bits
BigInt exact · Division by 16 live
Hexadecimal Output (unsigned)
0x1A4#0001A4
Raw Hex: 1A4
Octal: 0o644
Big-Endian Bytes: 01 A4
Little-Endian Bytes: A4 01
C Byte Array: { 0x01, 0xA4 }
24-Bit RGB Color: #0001A4 · rgb(0, 1, 164)
Binary: 0001 1010 0100
Repeated Division by 16 (Read Remainders Bottom-to-Top)420₁₀ = 0x1A4₁₆
Step-by-step repeated division by 16 quotient and remainder table
StepDivision OperationQuotientRemainder (0–15)Hex Digit
#1420 ÷ 162644
#226 ÷ 16110A
#31 ÷ 16011

Decimal to Hex Chart & Memory Milestones

Base 10 → Base 16
Decimal to Hex Chart with Big-Endian byte pairs and memory milestones
DecimalHex ValueBytes (BE)Engineering Context
100xA0AFirst alphabetic hex digit (A)
150xF0FMax single 4-bit nibble
160x1010Base-16 radix boundary (16^1)
2550xFFFFMax 8-bit unsigned byte / RGB channel
4200x1A401 A43-step divide-by-16 example
4,0960x100010 004 KiB OS virtual memory page
32,7680x800080 00Signed 16-bit int16 MSB boundary
65,5350xFFFFFF FFMax uint16 / TCP port limit
1,920,7280x1D4ED81D 4E D824-bit CSS RGB color #1D4ED8
16,777,2150xFFFFFFFF FF FFMax 24-bit RGB white (#FFFFFF)

Click any milestone row to load that value into the decimal to hex converter and inspect its divide-by-16 derivation and memory byte layout.

Signal & Number Converters

9 tools

Repeated Division by 16 & Signed Hexadecimal Registers

Every decimal to hexadecimal calculation converts a base-10 integer into base-16 by dividing repeatedly by 16 and mapping each remainder to a single hexadecimal symbol (0–9 and A=10 … F=15). Reading the remainders from last to first produces the exact hexadecimal numeral. This decimal to hex converter renders every quotient and remainder row automatically so students and systems engineers can verify manual math or register constants in seconds.

Because each hexadecimal digit packs exactly four binary bits (one nibble), radix-16 remains the compact shorthand for memory addresses, bitmasks, and C/Rust fixed-width integers. Switch between arbitrary unsigned, uint32, int32, uint64, and int64 inside this decimal to hex calculator to inspect exact zero-padded widths and Two’s Complement negative encodings without overflow.

Hexadecimal Color Codes, Byte Order & Worked Examples

Beyond classroom decimal to hexadecimal exercises, this decimal to hex converter bridges base-10 integers directly to hardware byte layouts (Big-Endian vs. Little-Endian) and 24-bit RGB color values. Use the interactive decimal to hex chart above or review these common derivations:

Worked Decimal and Hexadecimal Examples with Repeated Division by 16 and Byte Formats
Decimal (Base 10)Divide-by-16 TraceHex (Base 16)Memory / Color Format
255255÷16 = 15 r15 (F); 15÷16 = 0 r15 (F)0xFFByte FF · #0000FF
420420÷16 = 26 r4; 26÷16 = 1 r10 (A); 1÷16 = 0 r10x1A4BE: 01 A4 · LE: A4 01
1,0241024÷16 = 64 r0; 64÷16 = 4 r0; 4÷16 = 0 r40x400BE: 04 00 · 1 KiB
65,535Four consecutive remainders of 15 (F)0xFFFFuint16 max (2 bytes)
1,920,728R=29 (1D), G=78 (4E), B=216 (D8)0x1D4ED8CSS #1D4ED8 Cobalt
−1 (int32)2³² − 1 = 4,294,967,295 → eight F nibbles0xFFFFFFFFSigned 32-bit all-ones

Need the reverse power-of-16 expansion, binary fractions, or UTF-8 hex byte dumps? Switch directly to our Hex to Decimal Converter, Decimal to Binary Converter, or the full Hex Converter.

“The 6-digit hexadecimal notation defines an sRGB color by specifying red, green, and blue channels as three pairs of base-16 digits from 00 to FF.”

Hexadecimal & Signed Register Q&A

How do you convert decimal to hexadecimal using base-16 division?
Divide the decimal integer by 16 and record the remainder (0–9 stay 0–9, while 10–15 map to A–F). Repeat with each integer quotient until the quotient reaches 0, then read the recorded hex digits from bottom to top. For 420, remainders 4, 10 (A), and 1 assemble upward into 1A4.
How does this decimal to hex converter handle negative numbers?
In Unsigned mode, a minus sign stays outside the hexadecimal magnitude (for example, −420 becomes −0x1A4). In signed int32 or int64 mode, the engine applies Two’s Complement wraparound by adding 2³² or 2⁶⁴ before dividing by 16, so −1 outputs 0xFFFFFFFF in 32-bit registers.
Why do Big-Endian and Little-Endian byte orders differ for the same hex integer?
Hexadecimal digits are paired into 8-bit bytes from right to left. Big-Endian (network byte order) stores the most significant byte first (420 → 01 A4), whereas Little-Endian CPUs like x86-64 and ARM64 store the least significant byte at the lowest address (A4 01).
How do decimal integers map to CSS hex color codes?
An integer between 0 and 16,777,215 packs three 8-bit sRGB channels—Red, Green, and Blue—into six hex digits (#RRGGBB). For example, 1,920,728 divides cleanly into 0x1D (29), 0x4E (78), and 0xD8 (216), producing #1D4ED8.
Can this decimal to hex calculator process 64-bit or larger integers accurately?
Yes. JavaScript floating-point numbers lose integer precision above 2⁵³, but every calculation here uses native BigInt arithmetic so full uint64, int64, and 128-bit memory addresses remain exact.