#

Hex to Decimal Converter

Decimal
Decimal (Base 10)
-
Hexadecimal
-
Binary
-
Octal
-
Decimal

No sign-up required · Runs entirely in your browser · Your data is never stored

✓ Last reviewed: June 2026 · Methodology

Hexadecimal is a base-16 number system using digits 0–9 and letters A–F (A=10, B=11, C=12, D=13, E=14, F=15). To convert hex to decimal, multiply each digit by 16 raised to its positional power and sum the results. FF hex = (15×16) + (15×1) = 255 decimal. The converter above handles any hex, decimal, or binary value instantly.

Hex, binary, octal, decimal

Use this when: you need a quick, accurate result from hex to decimal converter without sign-up or tracking. All calculations run in your browser and no data is stored.

Number System Conversions

Computers use different number systems for different purposes. Decimal (base-10) is what humans use daily. Binary (base-2) is the fundamental language of computers, using only 0s and 1s. Hexadecimal (base-16) is used in programming for colors, memory addresses, and data representation. Octal (base-8) is used in some Unix file permissions. Continue your calculation with the Subnet Calculator, or check the Scientific Calculator.

Hexadecimal Explained

Hex uses 16 digits: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15). One hex digit represents exactly 4 binary digits, making it a compact way to represent binary data. For example, FF in hex equals 11111111 in binary equals 255 in decimal. Colors in web design use hex: #FF0000 is red, #00FF00 is green, #0000FF is blue.

What should you check before converting units?

Conversions are simple, but accuracy depends on using the correct unit. Always check whether the value is metric, imperial, digital, or temperature-based before comparing results. For work, study, travel, recipes, or shopping, round only at the end so the final number stays more accurate. If a result will be used for safety, construction, medicine, or finance, confirm it with an official standard or professional source.

What are the everyday uses for this tool?

This converter is useful for travel, recipes, study, product comparison, engineering notes, online shopping, and daily measurements. It is especially helpful when two sources use different systems, such as metric and imperial units.

What do the results actually tell you?

The Hex to Decimal Converter is built for people who want a fast answer without losing context. It keeps the calculation simple, shows the result clearly, and helps you understand what the number means before you use it in a real decision.

Conversion tools help translate values between measurement systems quickly. They are especially useful when comparing products, recipes, travel details, technical values, or international information.

What is hexadecimal?

Hexadecimal (hex) is a base-16 number system used extensively in computing, digital electronics, and programming. While the familiar decimal system uses 10 digits (0–9), hexadecimal uses 16 symbols: the digits 0–9 plus the letters A–F, where A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.

Hexadecimal is favoured in computing because it maps cleanly to binary (base-2) — each hex digit exactly represents 4 binary bits (a "nibble"). This makes hex a compact, human-readable way to express binary data. A single byte (8 bits) can be represented by exactly two hex digits (00 to FF), which is why hex appears everywhere in programming: memory addresses, colour codes, cryptographic hashes, MAC addresses, and machine code.

Converting between number systems

Decimal to Hexadecimal: Repeatedly divide by 16, record remainders in reverse order.

Convert 255 to hex: 255 ÷ 16 = 15 remainder 15 (F). 15 ÷ 16 = 0 remainder 15 (F). Reading remainders bottom-up: FF. So 255 (decimal) = FF (hex) = 11111111 (binary)

Hexadecimal to Decimal: Multiply each digit by 16 raised to its position power (rightmost = position 0).

Convert 2F to decimal: (2 × 16¹) + (15 × 16⁰) = 32 + 15 = 47

Convert 1A3 to decimal: (1 × 256) + (10 × 16) + (3 × 1) = 256 + 160 + 3 = 419

Hex to binary and binary to hex

Each hex digit maps to exactly 4 binary digits (bits):

Convert hex 3E to binary: 3 = 0011, E = 1110. Result: 00111110

Convert binary 10110101 to hex: Split into 4-bit groups: 1011 | 0101. 1011 = B, 0101 = 5. Result: B5

Common uses of hexadecimal in computing

Hexadecimal in programming

Most programming languages support hex literals directly:

How hexadecimal is used in web design

Web colours use 6 hex digits: #RRGGBB where RR=red, GG=green, BB=blue intensity (each 00–FF). #FF0000 = pure red (255,0,0). #000000 = black (0,0,0). #FFFFFF = white (255,255,255). #808080 = 50% grey (128,128,128). CSS also accepts 3-digit shorthand: #F00 = #FF0000. Hex colours are the universal language of web design — every colour in CSS, Photoshop, Figma, and Canva can be specified by its 6-character hex code.

Why computers use hexadecimal instead of decimal

Each hex digit represents exactly 4 binary bits (a "nibble"). FF hex = 1111 1111 binary = 255 decimal. Two hex digits represent exactly one byte (8 bits). This makes hex a compact, human-readable shorthand for binary data: a 32-bit memory address is 8 hex digits (e.g. 0x1A2B3C4D) vs 10 decimal digits (440926285). Hexadecimal is standard in computer science for memory addresses, colour values, error codes, IP addresses, and cryptographic hashes.

Frequently asked questions about hexadecimal

Why do programmers use hexadecimal instead of decimal? Hex maps directly to binary — each hex digit represents exactly 4 bits, making it easy to read and write binary data in a compact form. A 32-bit value requires 10 decimal digits but only 8 hex digits. This compactness is crucial for reading memory dumps, machine code, and network packets.

What does "0x" mean before a number? The "0x" prefix is a convention in many programming languages to indicate that the following number is in hexadecimal. 0xFF means "hex value FF" = decimal 255. Similarly, "0b" indicates binary (0b11111111 = 255) and "0o" indicates octal in Python.

How is hex used in HTML colour codes? HTML/CSS colour codes like #3498DB use three hex pairs: 34 (Red = 52), 98 (Green = 152), DB (Blue = 219). Each pair ranges from 00 (0) to FF (255). Shorthand #RGB uses one hex digit per channel: #F00 = #FF0000 = red.

Hexadecimal, decimal, and binary reference table (0–255)

HexDecBinaryHexDecBinaryHexDecBinary
00000000000558501010101AA17010101010
011000000016410001100100C019211000000
0A10000010107F12701111111D020811010000
0F15000011118012810000000E022411100000
1016000100008F14310001111F024011110000
1F31000111119014410010000FA25011111010
2032001000009F15910011111FE25411111110
3F6300111111A016010100000FF25511111111

Common hex values in web and computing

Hex ValueDecimalCommon Use
0x000Null character, black (#000000)
0x0A10Newline character (LF)
0x2032Space character (ASCII)
0x4165Letter "A" in ASCII
0x6197Letter "a" in ASCII
0x7F127Delete character (DEL)
0xFF255Max byte value; white (#FFFFFF)
0xFFFF65535Max 16-bit unsigned integer
0xFFFFFFFF4,294,967,295Max 32-bit unsigned integer; IPv4 broadcast

Sources & References

Sources: IEEE 754-2019 Standard for Floating-Point Arithmetic; W3C CSS Color Module Level 4 (hex colour notation); Unicode Consortium — character encoding standards.

Hex colours in CSS: web development reference

CSS colours use 6-digit hex codes representing RGB values. Each pair of hex digits gives one colour channel (0–255). #RRGGBB format: #FF0000 = Red (255,0,0). #00FF00 = Green (0,255,0). #0000FF = Blue (0,255,0). #FFFFFF = White (255,255,255). #000000 = Black (0,0,0). To convert: #7C6DF0 → R=7C=124, G=6D=109, B=F0=240 → rgb(124,109,240). CSS also accepts shorthand 3-digit hex: #ABC = #AABBCC. Hex with opacity (CSS4): #RRGGBBAA — the last pair is the alpha channel. Example: #FF000080 = 50% transparent red.

Binary, decimal, octal, and hex conversion table

DecimalBinaryOctalHex
0000000
5010155
10101012A
15111117F
16100002010
321000004020
64100000010040
12711111111777F
25511111111377FF

Related calculators

Formula reviewed by Mayra · Methodology · Last reviewed: June 2026