Conversion

Hexadecimal converter

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is the hexadecimal number system?

The hexadecimal number system (base 16) is a positional numeral system that uses sixteen symbols to represent numbers. These symbols include the digits from 0 to 9 and the letters from A to F. Each digit represents a power of 16, making it a compact and efficient way to express large numbers, particularly in computing and digital electronics.

In hexadecimal:

  • The digits 0–9 represent the values 0 to 9.
  • The letters A–F represent the values 10 to 15.

For example:

  • A₁₆ = 10₁₀
  • F₁₆ = 15₁₀

This base is widely used in programming because it aligns neatly with binary (base 2). Each hexadecimal digit corresponds exactly to four binary digits (bits), making the translation between the two straightforward.

Why hexadecimal is so common in computing

Computers operate using binary data (0s and 1s). However, binary numbers quickly become long and hard to read. Hexadecimal compresses this information without losing precision. For example:

  • Binary: 1111 1111 1111 1111
  • Hexadecimal: FFFF

Each hexadecimal digit represents a group of four bits. As a result, 8-bit bytes can be compactly represented as two hexadecimal digits.

This usability extends beyond simple data processing—hexadecimal is seen in memory addresses, digital color codes, and machine-level programming.

Formula for conversion

To convert a number from any base system to the hexadecimal system, two main steps are followed:

  1. Convert the original number to decimal (base 10).
  2. Convert the decimal number to hexadecimal (base 16).

For converting from decimal to hexadecimal, the following division method is used:

Remainder Sequence=Decimal number÷16\text{Remainder Sequence} = \text{Decimal number} \div 16

We repeatedly divide the decimal number by 16, recording the remainders at each step. The hexadecimal digits are then read from bottom to top.

Step-by-step examples

Let’s convert 254₁₀ to hexadecimal.

DivisionQuotientRemainder
254 ÷ 161514 (E)
15 ÷ 16015 (F)

Reading remainders from bottom to top: FE

25410=FE16254_{10} = FE_{16}

Converting 16₁₀ to hexadecimal

DivisionQuotientRemainder
16 ÷ 1610
1 ÷ 1601
1610=101616_{10} = 10_{16}

Conversion from other number systems

Our converter can handle not just decimal, but any number system from base 2 to base 36.
For example, to convert 213₈ (octal) to hexadecimal

  1. Convert to decimal: 2×82+1×81+3×80=139102 \times 8^2 + 1 \times 8^1 + 3 \times 8^0 = 139_{10}
  2. Convert 139₁₀ → 8B₁₆
2138=8B16213_8 = 8B_{16}

Using the hexadecimal converter

This converter allows seamless conversion between bases from 2 to 36 into hexadecimal. Simply enter your number and select its base system. Results are generated instantly — no extra steps or “calculate” button needed.

The converter automatically recognizes valid characters depending on the base selected:

  • For base 2: only 0 and 1 allowed.
  • For base 10: digits 0–9.
  • For base 16: digits 0–9 and A–F.
  • For base 36: digits 0–9 and A–Z.

How hexadecimal is used in colors and web design

In web development, hexadecimal notation plays a vital role in representing colors. Every color on a digital screen is composed of three components — red, green, and blue (RGB) — each ranging from 0 to 255 in decimal. In hexadecimal, this range is 00 to FF.

A color is displayed as a combination of these three pairs:

#RRGGBB\#RRGGBB

Example:

  • #FF0000 → Pure Red
  • #00FF00 → Pure Green
  • #0000FF → Pure Blue
  • #FFFFFF → White (maximum intensity of all three colors)
  • #000000 → Black (no light)

Each pair corresponds to one color channel:

  • RR controls the amount of red,
  • GG controls the amount of green,
  • BB controls the amount of blue.

For example, if you choose #4CAF50:

  • 4C₁₆ = 76₁₀ (red component),
  • AF₁₆ = 175₁₀ (green component),
  • 50₁₆ = 80₁₀ (blue component).

The combination results in a medium green shade.

This compact representation is ideal for developers and designers working with web pages, digital graphics, and user interfaces.

Conversion table for quick reference

DecimalHexadecimalDecimalHexadecimal
0088
1199
2210A
3311B
4412C
5513D
6614E
7715F

Frequently asked questions

How to convert 125₁₀ to hexadecimal?

DivisionQuotientRemainder
125 ÷ 16713 (D)
7 ÷ 1607

Reading from bottom to top: 7D

12510=7D16125_{10} = 7D_{16}

Why does web design use hexadecimal colors instead of decimal?

Hexadecimal enables concise representation of RGB values using only six characters, aligning perfectly with byte-sized values (0–255) in digital color systems.

Convert number 600 to hexadecimal

DivisionQuotientRemainder
600 ÷ 16378
37 ÷ 1625
2 ÷ 1602

Reading from bottom to top: 258

60010=25816600_{10} = 258_{16}

Report a bug

This field is required.