Hex to Decimal Converter
Type a hexadecimal number and read it in decimal.
Runs entirely in your browser
Loading the tool…
| Decimal | — |
|---|---|
| Hexadecimal | — |
| Octal | — |
| Binary | — |
| Base 32 | — |
| Base 36 | — |
- —Bits
- —Bytes
- —Fits in
- —Parity
Any base from 2 to 36
Type a hexadecimal number and read the decimal on the row below. The box opens on
FF, which is 255, the value a single byte holds when every bit is
set.
Hex exists because one hex digit is exactly four bits. That clean fit is why a byte is two hex digits and never a fraction of one, and why memory addresses, colour codes and byte dumps are all written this way: the digits line up with the bits, which decimal never does.
Case does not matter, and a leading 0x is the C convention for saying
"this is hex" rather than part of the number. The row of bits and bytes below the
conversions is often the thing actually wanted: it says how wide the value is, which
is what tells you whether it fits in the field you are about to put it in.
Every other base is converted at the same time, so this page also answers hex to binary and hex to octal. Going the other way is decimal to hex, and binary to decimal starts from base 2.
How to use it
- Read the row you came for. Every base is converted at once.
- Type your own number into the box, which converts as you type.
- Use the custom base field for anything from 2 to 36.
Questions
What is FF in decimal?
255. It is the largest value two hex digits can hold, and therefore the largest an unsigned byte can hold, which is why it turns up everywhere from colour channels to permission masks. FFFF is 65,535 for the same reason, two bytes wide.
Why is hexadecimal used instead of decimal?
Because one hex digit is exactly four bits, so a byte is always two digits and nothing straddles a boundary. Decimal has no such relationship with binary, which makes it useless for reading memory, and hex became the shorthand for looking at bits without writing them all out.
Does it handle negative numbers and very large ones?
Negative numbers yes. Size is bounded by what the conversion can represent exactly, and a value beyond that is refused rather than silently rounded, since a base conversion that quietly loses the low digits is worse than no answer.
Is anything sent anywhere?
No. The conversion runs in WebAssembly in this tab and the page makes no request of its own, so it works with the network off and nothing you type is recorded.
Other conversions
The same converter opened on a different base. Every base is shown on each of them.
Your data stays on your device
Everything above runs inside your browser as WebAssembly compiled from Rust. Nothing you type is uploaded, logged or stored on a server. You can load this page once, go offline, and it still works.
This page makes no requests at all, to anywhere. That is not a promise in the copy: it is a Content-Security-Policy header your browser enforces, and connect-src on it is none. Open the network tab and watch nothing happen.