Convert Decimal to Hexadecimal

Convert decimal to hexadecimal instantly, e.g. 255 to FF — free online hex converter.

About

About the Decimal to Hexadecimal Converter

Hexadecimal is how programmers write colour codes, memory addresses and byte values, so converting decimal to hex is the everyday step between a number you'd naturally type — like an RGB value of 255 — and the hex form code actually uses, like FF.

Converting by hand means dividing by 16 and mapping each remainder to 0–9 or A–F: 255 ÷ 16 is 15 remainder 15, which gives F and F — FF. Every value from 0 to 255 fits in at most two hex digits, which is why a colour like rgb(255, 136, 0) is written #FF8800.

Choose what to view about this tool

Guide

Using the Decimal to Hexadecimal Converter

  1. 1

    Step 1

    Decimal is already selected below as the input base.

  2. 2

    Step 2

    Type your ordinary base-10 number into the value box.

  3. 3

    Step 3

    The result table fills in instantly — the hex value sits alongside binary, octal and decimal all at once.

  4. 4

    Step 4

    For a quick manual check, divide the number by 16 repeatedly, writing down each remainder (using A-F for 10-15), then read the remainders back from bottom to top.

  • Converts decimal to uppercase hex as you type, like 255 → FF
  • Shows the result with no 0x prefix or padding, so 10 becomes A rather than 0A
  • Handles negative numbers with a leading minus sign, like -26 → -1A
  • Shows the value in binary, octal, decimal, hexadecimal and base 36 at once, plus any custom base from 2 to 36
  • Exact for whole numbers up to 9,007,199,254,740,991, and tells you when a number is too large
  • Runs entirely in your browser — free, with no sign-up and no limit

Web designers

Designers turn RGB channel values into the pairs of a hex colour code.

Programmers

Programmers write a decimal ID, size or offset as a hex literal.

Game modders

Modders find the hex value to search for in a save-file or memory editor.

Students

Students check divide-by-16 exercises without long division.

Popular base conversions

Examples

Decimal to Hexadecimal examples

3 worked examples

01

Maximum byte value

255 in decimal equals FF in hex — the highest value a single byte can hold, as seen in #FFFFFF white.

02

A memory-style address

4096 in decimal equals 1000 in hex.

03

One colour channel

87 converts to 57 in hex — the green pair in the colour #FF5733.

FAQ

Frequently asked questions

Quick answers to common questions about the Decimal to Hexadecimal Converter.

How do I convert decimal to hex?

Type your decimal number above, with decimal selected as the input base. The hexadecimal value appears instantly in the results table — nothing is uploaded anywhere.

How do you convert decimal to hex by hand?

Divide the number by 16 repeatedly and keep each remainder, writing 10-15 as A-F: 255 ÷ 16 = 15 remainder 15. Reading the remainders bottom to top gives FF.

What is 255 in hex?

255 in decimal is FF in hexadecimal — the maximum value a single byte can hold, which is why FF shows up so often in colour codes like #FFFFFF for white.

Is this decimal to hex converter free?

Yes. It's free, with no sign-up and no limit on how many numbers you convert.

Can I convert hex back to decimal?

Yes — the same converter works in both directions. Select hexadecimal as the input base instead, or use the dedicated hex to decimal converter page.

How large a decimal number can I convert?

Up to 9,007,199,254,740,991 — beyond that the conversion won't be exact, and the tool will tell you so.

How do I turn RGB values into a hex colour code?

Convert each channel separately and join them: 255, 87 and 51 become FF, 57 and 33, so the colour is #FF5733. Pad single-digit results with a zero, so 9 becomes 09.

How are negative numbers shown in hex?

With a minus sign, so -255 becomes -FF. Programs usually store negatives in two's complement instead — -1 is FFFFFFFF as a 32-bit value — so work that out separately if you need the stored form.

Why is the hex result in capital letters?

Uppercase digits like FF are easier to read next to other text. Hex isn't case-sensitive, so ff in CSS, code or a URL means exactly the same value.

Still have a question? Contact us

Report a problem

Decimal to Hexadecimal Converter

What went wrong?
    or paste a screenshot