web3 / uint256 converter

Paste any value — a decimal number, a 0x hex blob, or plain text — and get every representation you need for a contract call. These conversions happen in your browser; no data is sent or stored.

try
hex minimal, byte-aligned
decimal the uint256 value
utf-8 text, trailing 0x00 padding ignored
uint256 32 bytes, left-padded — how a number is ABI-encoded
bytes32 32 bytes, right-padded — how a short string is ABI-encoded
ether value ÷ 10¹⁸
gwei value ÷ 10⁹

Why

uint256 / web3 conversion for Ethereum, useful for:

What each row means

Row Meaning
hex The minimal byte-aligned hex form. Text becomes its utf-8 bytes, numbers become big-endian hex.
decimal The value read as one big-endian unsigned integer — what a contract sees as a uint256.
utf-8 The bytes decoded as text. Trailing 0x00 padding is ignored; invalid sequences are reported instead of mangled.
uint256 Padded to 32 bytes on the left, which is how a number is ABI-encoded.
bytes32 Padded to 32 bytes on the right, which is how a short string is ABI-encoded.
ether / gwei The number divided by 1018 and 109, for wei amounts.

How the input is detected

Anything starting with 0x is read as hex bytes, a plain run of digits (optionally negative, _ and spaces allowed) is read as a decimal number, and everything else is read as utf-8 text. Ambiguous input like dead or 123 can be forced with the read as selector.

Negative numbers are shown as their two's complement, because that is how int256 is encoded on-chain. Values wider than 256 bits are flagged rather than silently truncated.

Privacy

The converter is plain JavaScript running locally on native BigInt arithmetic. There is no backend, no analytics and no third-party script — the page works offline once loaded.

Need the background instead? See what uint256 means in Ethereum. The original conversion idea comes from web3-type-converter.