Tools.GamesLoop Logo
TOOLS.GAMESLOOP160+ Free Online Tools

Convert Decimal to Hex

Convert decimal numbers to hexadecimal.

Decimal to Hex Converter

Developer tool running locally in browser

Advertisement
Ad Space (auto) — Configurable via NEXT_PUBLIC_ADSENSE_CLIENT

What does Decimal to Hex Converter do?

Convert decimal to hexadecimal with the repeated-division working shown, and optional padding to a byte width. Binary and octal are shown alongside for reference.

How to Use Decimal to Hex Converter

  1. 1
    Enter a decimal numberAny whole number.
  2. 2
    Choose the case and paddingOptional formatting.
  3. 3
    Read the hex valueWith the working below.

Key Features

  • Repeated-division working shown
  • Uppercase and lowercase output
  • Optional padding to 2, 4, 8 or 16 digits
  • Binary and octal shown alongside
  • Exact for arbitrarily large integers

Frequently Asked Questions

How do I convert decimal to hex by hand?

Divide by 16 repeatedly and record each remainder, converting remainders 10–15 to A–F. Reading them bottom to top gives the hex value. 255 gives 15 and 15, so FF.

Should I use uppercase or lowercase?

Either is valid. Uppercase is conventional for constants, colour codes and documentation; lowercase is common in URLs, hashes and Unix tooling. Be consistent within a codebase.

Why pad to two digits?

Because a byte is always two hex digits. Writing 15 as 0F rather than F keeps byte dumps aligned and makes the value’s size unambiguous.

What is 255 in hex?

FF — the maximum value of a single byte, which is why it appears in colour codes such as #FFFFFF for white and in subnet masks.