Hex ↔ Decimal / Uint256 Converter
Convert between hexadecimal values and decimal uint256-style integers. Perfect for decoding Ethereum calldata, logs, and on-chain uint256 values.
Hex ↔ Decimal Converter
Edit either field to auto-convert
Must start with 0x and contain only hexadecimal characters.
Positive integers only
Hex ↔ Decimal Converter
Convert between hexadecimal (0x...) and decimal values with full uint256 precision. Essential for decoding Ethereum calldata, storage values, logs, and any on-chain uint256 data.
Why Convert?
- •Decode Calldata: Understand function parameters in transactions
- •Read Storage: Interpret raw storage slots from contracts
- •Parse Logs: Decode event parameters and indexed values
- •Encode Scripts: Convert decimal values for calldata construction
What is uint256?
- •256-bit Integer: Can store values from 0 to 2^256 - 1
- •Ethereum Standard: Default integer type in Solidity
- •Hex Representation: 64 hex characters (32 bytes) when fully padded
- •No Decimals: Always a whole number, perfect for amounts and IDs
Conversion Examples
Common uint256 conversions you'll encounter in Ethereum development:
Why Even Hex Length?
Hexadecimal represents bytes (8 bits = 2 hex chars). Odd-length hex like "0x1" is technically "0x01" (1 byte). The converter enforces even length to ensure correct byte alignment.
Signed vs Unsigned
Use signed mode for interpreted two's complement values. Most Solidity code uses unsigned by default.
Common Questions
How do I decode Ethereum transaction calldata?
Use this converter to transform hex values from transaction input data. First extract the hex bytes, then convert them to decimal to understand function parameters or storage values.
Why does my very large number show as scientific notation?
JavaScript's BigInt handles arbitrary-precision integers, but some displays may use scientific notation. Copy the full value—it's accurate. Use the "Number grouping" option for readability.
What's the maximum uint256 value?
115792089237316195423570985008687907853269984665640564039457584007913129639935
