Hex to Decimal Converter Online

Convert any hexadecimal number to decimal with step-by-step powers-of-16 expansion. Accepts 0x and # prefixes, batch mode for bulk work — 100% in your browser.

Enter a hex value to see all four base representations.

What is hex to decimal conversion?

Hex to decimal conversion reads a base-16 number and computes its base-10 value. Each hex digit (0-9, A-F) is multiplied by 16 raised to its position; the products are summed to give the decimal. This is how every program implicitly interprets hex literals.

The OpenFormatter hex-to-decimal converter runs in your browser — no upload, no rate limit, no account. Paste a hex value (with optional 0x or # prefix), get the decimal result, plus the equivalent binary and octal, plus a digit-by-digit expansion that explains the math.

How to convert hex to decimal — 4 steps

  1. Enter a hex value. Up to 14 hex digits. The 0x and # prefixes are stripped automatically.
  2. Read the decimal output. The result appears highlighted; binary and octal are shown alongside.
  3. Study the expansion. Each hex digit is multiplied by its place value (16n) — the same algorithm used internally by parseInt(s, 16).
  4. Switch to batch mode. Convert many hex strings at once and copy the table to a spreadsheet.

Sample input and output

Input:  FF

Output:
  Hex:     0xFF
  Decimal: 255
  Binary:  11111111
  Octal:   0o377

Expansion: 0xFF = F × 16^1 (240) + F × 16^0 (15) = 255

FF is the largest 8-bit unsigned value — 255 — which is why it shows up everywhere from CSS colors to network ACL masks to single-byte error codes.

Single + Batch Modes

Decode a single hex value with full expansion, or paste hundreds of values (one per line) for a copyable conversion table.

Educational Expansion

Powers-of-16 breakdown shows how each hex digit contributes — the same algorithm parseInt uses internally.

Client-Side Only

All math runs in the browser via parseInt(string, 16). Nothing is uploaded — verify in DevTools Network.

Common use cases

  • check_circleCSS color codes — converting #FF8800 to RGB integers and back
  • check_circleReading memory addresses in debuggers, gdb, lldb, x64dbg
  • check_circleDecoding HTTP response codes and protocol error fields
  • check_circleParsing MAC addresses, IPv6 segments, and network identifiers
  • check_circleInterpreting hash digests (MD5, SHA-1, SHA-256) as integers
  • check_circleReverse engineering — translating hex literals from disassembly to decimal
  • check_circleEmbedded firmware — register values from datasheets back to integer math
  • check_circleCTF challenges, cryptography labs, and hex-encoded ciphertext analysis

The conversion math, explained

The tool calls parseInt(string, 16). Internally that walks the hex string left to right, multiplying the running total by 16 and adding the current digit (with A-F mapped to 10-15). For FF: 0·16+15=15, 15·16+15=255. Equivalently, FF = F·161 + F·160 = 240 + 15 = 255. The expansion panel above shows the per-digit breakdown so you can sanity-check the result by hand.

Need the reverse direction?

Browse the rest of the OpenFormatter base toolkit — every conversion runs in your browser.

Frequently Asked Questions

What is hexadecimal?

Hexadecimal (hex) is a base-16 number system using digits 0-9 and letters A-F (where A=10, B=11, …, F=15). Each hex digit packs exactly 4 binary bits, making hex the standard human-readable shorthand for binary in computing — memory addresses, color codes, hashes, and machine code all use it.

Why use hex?

Hex is compact and aligns naturally with byte boundaries. One byte = exactly two hex digits, four bytes = eight hex digits, etc. That makes hex the canonical format for memory dumps, register state, network packets, hash digests, and anywhere you need to talk about raw bytes without writing 8 bits at a time.

How does each hex digit map to decimal?

Digits 0-9 map to themselves. A=10, B=11, C=12, D=13, E=14, F=15. The position of each digit determines its weight: rightmost is 16^0=1, next is 16^1=16, then 16^2=256, 16^3=4096, and so on. Multiply each digit by its weight and sum to get the decimal.

Does the input accept 0x or # prefixes?

Yes. The converter strips a leading 0x (programmer convention) or # (CSS color convention) before parsing. So 0xFF, #FF, and FF all parse to 255 decimal. Anything other than the prefix and 0-9/A-F triggers a clear error.

How is hex case handled?

Hex is case-insensitive on input — 0xFF and 0xff both parse to 255. The output uses uppercase by default to match the dominant convention in C, Java, hardware specs, and protocol documentation. Lowercase appears more often in CSS color codes and Unix tools.

What is the largest hex I can convert?

Up to 14 hex digits, capped at Number.MAX_SAFE_INTEGER (2^53 − 1). Above that, JavaScript number precision degrades. For 64-bit integers, larger crypto values, or arbitrary-precision arithmetic, use BigInt: BigInt("0x" + hex) parses any-length hex into an exact integer.

How do I convert a CSS color like #FF8800?

Split into three pairs: FF, 88, 00. Each pair is one byte (0-255) for red, green, blue. FF=255, 88=136, 00=0 → RGB(255,136,0), a strong orange. Paste a single 6-digit color into this tool and the result is the integer encoding (16,746,496 for #FF8800), which is what some APIs expect.

Is the data sent to a server?

No. All conversion happens in JavaScript inside your browser. Open DevTools → Network and confirm zero requests when you click Convert. Safe for internal IDs, secret tokens, hashes, or proprietary numeric data.

Hex to Decimal Converter Online — Free Hexadecimal to Base-10 Tool