Hex to Decimal Converter
Convert hexadecimal to decimal and back — edit either field and the other updates, with optional 0x or # prefixes.
Hex to Decimal Converter
A leading 0x or # is optional and ignored. Hex accepts 0–9 and A–F.
🔒 Nothing you enter is sent anywhere or stored. All processing happens in your browser.
How it works
Hexadecimal (base 16) packs four bits into a single digit, which makes it the go-to shorthand for colours, memory addresses, byte values and hashes. Its digits run 0–9 and then A–F for the values ten to fifteen. This tool converts hex to plain decimal and decimal back to hex, both at the same time.
Paste or type a hex value on the left — with or without a leading 0x or # — and its decimal value appears on the right instantly. Type a decimal number on the right and the uppercase hex equivalent appears on the left. The fields are linked, so there is no button to press. Whitespace is stripped and both common prefixes are accepted, which is handy when pasting CSS colours or code snippets.
Input is validated: hex must use only 0–9 and A–F, and decimal must be a non-negative whole number. Invalid input shows an error rather than a wrong number, and conversions are exact even for very large values thanks to arbitrary-precision integers.