Convert & calculate · Hex to decimal
Number converter
Move a number between decimal, hexadecimal and binary.
The number
Type it once. Every other form appears beside it as you go.
Paste from a block explorer, a log, or a calculator. Spaces and commas are ignored.
Leave this on automatic unless your number has no 0x or 0b in front of it.
Nothing to convert yet
Type a number on the left and its decimal, hexadecimal and binary forms all appear here at once.
Numbers you'll meet a lot
Handy for sanity-checking a value you pulled out of a transaction.
| Decimal | Hexadecimal | What it is |
|---|---|---|
| 255 | 0xff | The largest single byte |
| 21,000 | 0x5208 | Gas used by a plain ETH transfer |
| 1,000,000,000 | 0x3b9aca00 | Wei in one gwei |
| 1,000,000,000,000,000,000 | 0xde0b6b3a7640000 | Wei in one ether |
About this tool
Hexadecimal is base 16, the way Ethereum writes addresses, hashes, calldata and JSON-RPC numbers. This number converter shows a whole number in decimal, hexadecimal and binary side by side as you type. It uses arbitrary-precision BigInt math, so full 256-bit values such as the uint256 maximum convert exactly. A 0x or 0b prefix is detected automatically, and spaces and commas are ignored.