Decimal to Hex Converter

Type decimal or hex numbers, one per line, and they convert instantly.

Your text and files never leave your browser — nothing is sent to a server.

How to use

  1. Choose a direction and type one number per line.
  2. With width set to “None”, negative numbers keep a minus sign (-FF).
  3. Pick 8, 16, 32 or 64-bit to see negative numbers the way computers store them — two’s complement, padded to the full width (-1 → FF in 8-bit).
  4. In “Hex → decimal” with a width selected, values whose top bit is set are read as negative (FF in 8-bit → -1).
  5. 0x prefixes and spaces or underscores between digits are accepted.

FAQ

What is two’s complement?

It is how CPUs store signed integers: a negative number n is stored as 2^bits + n. In 8 bits, -1 is FF and -128 is 80.

What range does each width allow?

Negative values must fit the signed range — for example -128 to 127 in 8-bit. Positive values up to the unsigned maximum (255 in 8-bit) are also accepted.

Can it handle numbers larger than 64 bits?

Yes, when width is “None”. The conversion uses BigInt, so every digit is kept.

Related tools

All tools