Hex to Decimal Converter

Convert hexadecimal numbers to decimal exactly, with step-by-step working.

Hex to Decimal Converter tool

Digits 0 to 9 and A to F, in either case. A 0x prefix is fine.

—
Decimal
—
Binary
—
Octal
—
Digits in the result

About the Hex to Decimal Converter

Memory addresses, color codes, error codes and byte values are written in hexadecimal, but their size is easier to judge in decimal. This hex to decimal converter works exactly on numbers of any length: FF is 255, 1A3 is 419 and 7FFFFFFF is 2,147,483,647, the largest signed 32-bit integer. The place-value working shows how each digit contributes, and binary and octal results appear alongside.

The converter uses place values: each hexadecimal digit is multiplied by 16 raised to its position, counting from 0 on the right, and the results are added. Each digit's contribution is listed in the working section. Examples: FF in hexadecimal is 255 in decimal; 1F4 in hexadecimal is 500 in decimal; C0FFEE in hexadecimal is 12648430 in decimal.

Hexadecimal is how programmers write binary data compactly: each hex digit stands for exactly four bits. You meet it in color codes (#FF8800), memory addresses, error codes, MAC addresses, Unicode code points (U+1F600) and file signatures. Converting hex to decimal tells you the actual quantity, for example that the color channel FF is 255 or that address 0x1000 is 4,096.

Other bases are covered by the number base converter, which converts between any bases from 2 to 36. For arithmetic in these bases, use the binary calculator or the hex calculator; to turn text into its binary character codes, use text to binary.

How to use the Hex to Decimal Converter

  1. Enter the hexadecimal numberType or paste the number. Digits 0 to 9 and A to F, in either case. A 0x prefix is fine.
  2. Read the decimal resultThe decimal value appears instantly, along with the binary and octal equivalents.
  3. Follow the workingOpen the step-by-step section to see how the conversion was done, digit by digit or division by division.
  4. Copy or shareCopy all results with one click, or copy a link that reopens the converter with the same number.

Hex to Decimal Converter features

  • Exact conversion of numbers of any length using BigInt arithmetic
  • Step-by-step working for homework and exam practice
  • Binary and Octal results shown alongside
  • Negative numbers with 8- to 128-bit two's complement forms
  • Optional digit grouping (4 bits, 2 hex digits or thousands) for easy reading
  • Accepts prefixes such as 0x, 0b and 0o and ignores spaces and underscores
  • Runs in your browser with nothing sent to a server

Common uses

  • Checking computer science and digital electronics homework
  • Reading values from datasheets, debuggers and log files
  • Working out color codes, permissions and bit masks
  • Converting values for programming and scripting
  • Learning how positional number systems work

Hex to decimal in practice: colour codes, Windows error codes, Unicode letters, byte order in hex dumps and signed values

By the FreeToolsWorld editorial team · Updated November 2026 · How we write and check our guides

Hexadecimal turns up wherever computers show raw values: colour codes, error messages, Unicode references, network hardware and file dumps. Converting to decimal reveals the quantity behind each value. This guide converts a colour code, decodes a common Windows error code, links Unicode code points to HTML entities and explains byte order and signed values, two details that often make hex dumps confusing.

A worked example: a colour code

The colour #1E90FF has three pairs: 1E, 90 and FF. Converting each gives 30, 144 and 255, the amounts of red, green and blue on a scale of 0 to 255. By place value, 1E is 1 × 16 + 14 = 30, and 90 is 9 × 16 + 0 = 144. Programs that ask for RGB values in decimal accept exactly these three numbers.

Windows error codes

Windows often reports errors as hexadecimal codes such as 0x80070005. In decimal that is 2,147,942,405, which is not very helpful by itself. The structure is more useful: the final four hex digits, 0005, are the underlying Windows error number 5, which means access denied. Searching for the full hex code alongside the decoded meaning usually finds the fix quickly.

Unicode letters

Unicode identifies every character by a hexadecimal code point. The Urdu and Arabic letter alef is U+0627, which is 1575 in decimal, so it can be written in HTML as the numeric entity ا. Converting code points to decimal is handy when a system accepts only decimal character references.

Byte order in hex dumps

Many computers store multi-byte numbers with the least significant byte first, called little-endian order. In a hex dump, the bytes 01 00 00 00 represent the number 1, not 16,777,216. When values read from files or network captures look absurdly large, reversing the byte order before converting often gives the sensible answer.

Signed values

The same hex value can mean different numbers depending on whether it is treated as signed. FF is 255 as an unsigned byte but −1 as a signed one, because signed values use the highest bit to indicate negative numbers in two's complement form. Documentation for a file format or protocol states which interpretation applies.

Hardware addresses

Network cards have MAC addresses written as six hex bytes, such as 3C:52:82:1A:2B:3C. The first three bytes identify the manufacturer, which helps when identifying unknown devices on a home or office network from a router's list of connected clients.

Exam working

For coursework, write each digit's value, multiply by the matching power of 16 and add. For 2F, that is 2 × 16 + 15 = 47; for 1F4 it is 1 × 256 + 15 × 16 + 4 = 500. Writing A to F as 10 to 15 before multiplying avoids the most common slip.

Sizes in hex

Memory sizes and offsets are often written in hex: 0x400 is 1024, one kibibyte, and 0x1000 is 4096, a common memory page size. Recognising these round hex values makes logs and technical documentation much easier to read.

Prefixes and notation

Hex values appear with different markers: 0x in most programming languages, a hash sign in colour codes, an h suffix in some assembly languages and U+ for Unicode. All mean the same thing. Remove the marker before converting, and remember that letter case does not matter: ff and FF are the same value.

Common mistakes

  • Converting little-endian byte sequences without reversing them.
  • Treating signed bytes as unsigned.
  • Including prefixes such as 0x or # in calculations.
  • Forgetting that hex letters represent 10 to 15.

Related tools

To convert decimal numbers back, use Decimal to Hex Converter. For colour values specifically, try HEX to RGB Converter, and to look up character code points, Unicode Converter.

Short colour codes

Three-digit colour codes are shorthand in which each digit is doubled, so #FC0 means #FFCC00. Converted, that gives red 255, green 204 and blue 0, a warm yellow. Expand the short form before converting, otherwise F alone would be read as 15 instead of 255.

Transparency in colour codes

Eight-digit colour codes add a fourth pair for transparency, known as alpha. In #1E90FF80, the final 80 is 128 in decimal, about 50 percent opacity on the 0 to 255 scale. Converting the alpha pair shows exactly how transparent an overlay or shadow colour will be.

Hex inside web addresses

Percent-encoding in addresses uses hex bytes. The sequence %20 is hex 20, which is 32 in decimal, the code for a space, and %2F is 47, the slash. Recognising these values makes it much easier to read encoded links and log entries without a separate tool.

Spreadsheet functions

Excel and Google Sheets provide HEX2DEC for converting whole columns of values, such as colour codes or device identifiers. It accepts up to ten hex digits, so very long values, such as full hashes, need to be split or handled in a script instead.

Privacy

Conversions run in your browser. Nothing you enter is sent anywhere or stored.

Frequently asked questions

What is FF in decimal?

FF in hex is 255 in decimal: F is 15, so the value is 15 × 16 + 15 = 255. That is the largest value a single byte can hold, which is why it appears so often in color codes, where FF means full brightness for a channel.

What is the largest number this converter can handle?

It accepts up to 400 digits, far beyond the 64-bit limit of 18446744073709551615 (2^64 − 1). The calculation uses arbitrary-precision integers, so even very long numbers convert exactly without rounding.

Can I convert negative numbers?

Yes. Put a minus sign in front and the result keeps the sign, for example -FF in hexadecimal is -255 in decimal. For binary work, the details section also shows the two's complement form that computers use to store negative integers.

Does it convert fractions or decimal points?

No. The converter works with whole numbers, which is what bases are used for in computing. Fractional values such as 0.1 often have infinitely repeating forms in binary, so they need a separate floating-point tool.

Why are the digits grouped?

Grouping makes long numbers easier to read and check: binary is split into blocks of 4 bits (one hex digit each), hex into pairs (one byte each) and decimal into thousands. Untick the grouping option to get one continuous string for copying into code.

Are hex letters case-sensitive?

No. The letters A to F and a to f mean the same values, 10 to 15, so 1f4, 1F4 and 0x1F4 are all read as 500. The converter accepts either case and always shows hex results in capitals, which is the most common convention in documentation.