Hex to decimal converter

Paste a hex number, with or without 0x, and read its decimal value at once. Upper and lower case letters both work, and with Signed on the value is read as two's complement.

Free and private. Everything runs in your browser, nothing is uploaded.

How it works

  1. Type the numberEnter the value in the input box. Spaces and underscores between digits are ignored.
  2. See the resultThe converted value appears right away, together with the other common bases.
  3. Copy itPress Copy next to the result you need.

Reading hexadecimal

Each hex digit is worth 16 times the digit on its right. BEEF is 11 x 4096 + 14 x 256 + 14 x 16 + 15 = 48879. The converter accepts long values such as 64 or 128 bit hashes and IDs and converts them exactly, where a normal calculator would round them.

Values read from memory dumps, logs and protocols are often signed. Turn on Signed and choose the width to read FFFFFFFE as -2 in 32 bits, or let the tool pick the smallest width that fits. The binary and octal forms appear at the same time, and the bit view shows every bit of the value.

Frequently asked questions

Why does FF give 255 and not -1?

Without Signed, hex is read as an unsigned number. Turn on Signed and choose 8 bits to read FF as -1.

How do I convert decimal to binary by hand?

Divide the number by 2 again and again and write down the remainders, then read them from the last to the first. For 13: 13, 6, 3, 1 give remainders 1, 0, 1, 1, so 13 is 1101.

Why does 0.1 never end in binary?

Because 1/10 cannot be written as a sum of powers of two, just as 1/3 never ends in decimal. The repeating part 0011 is shown in brackets.

What is the largest number I can convert?

Numbers with up to 20,000 digits are accepted. The results are exact, there is no rounding.

Is anything sent to a server?

No. All calculations happen in your browser.