Text & code / MULTIVERTO

Hexadecimal to decimal

Read a hexadecimal whole number as an exact decimal integer.

Live converterYour input stays in this browser. No text is uploaded for conversion.
The file stays in your browser.
Chain tools

Apply each text tool to the previous result.

01 / Guide

How it works

Each hex digit is weighted by a power of sixteen; the optional 0x prefix identifies the base.

Good to know

The sign is written separately; these results are not fixed-width two’s-complement machine integers.

02 / Example

Example

Your input0xFF
Result255

03 / Guide

Hexadecimal to decimal — How it works

Expanding a hexadecimal integer

Read a hexadecimal whole number as an exact decimal integer. Use this direction when a debugging trace, memory map or specification shows a whole number with hex digits and you want its familiar decimal value. You may enter FF or 0xFF; upper- and lowercase A through F have equal value. The prefix is a clue to the base and does not add to the number.

Each hex digit is weighted by a power of sixteen; the optional 0x prefix identifies the base. Each digit is weighted by a power of sixteen: in FF, the first F is fifteen times sixteen and the second F is fifteen, totaling 255. The result is an exact integer even for values beyond JavaScript’s safe floating-point integer range because the tool uses BigInt. A leading minus sign stays mathematical; no fixed-width signed decoding is performed. For a concrete check, the example input 0xFF produces 255. Keep the original beside the result when comparing it with another application.

What a number base changes

Decimal, binary and hexadecimal are different written forms of the same integer. Decimal has ten digits, binary has two, and hexadecimal has sixteen symbols, adding A through F after 0 through 9. The value itself does not change when its notation changes. A bit is a binary digit; four bits correspond to one hexadecimal digit, which makes hex compact for memory addresses, bit masks and debugging. Use these converters when a specification, log or programming language displays a number in a base other than the one you are reading.

Reading signs and widths correctly

The sign is written separately; these results are not fixed-width two’s-complement machine integers. These converters work with whole integers and retain arbitrary precision through BigInt, so a long value does not silently lose low bits as an ordinary floating-point number might. A leading minus sign represents a negative mathematical integer. It is not a fixed-width two’s-complement byte pattern: the bit string for minus one depends on whether a machine uses eight, sixteen, thirty-two or another number of bits. Add a width and encoding rule separately if a protocol requires one. Do not confuse the binary value of an integer with UTF-8 binary bytes of the characters used to spell it.

How this conversion transforms the input
Hexadecimal integer
Positional digits
Decimal integer