uint256 converter

Convert between hex, decimal, utf-8 text, uint256 and bytes32. Everything is computed in your browser — no input ever leaves this page.

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⁹

What is uint256?

uint256 is the workhorse number type of the Ethereum Virtual Machine: an unsigned integer that is 256 bits (32 bytes) wide. Unsigned means it has no sign bit, so it holds whole numbers from 0 up to 2²⁵⁶ − 1. 256 bits is also the EVM's native word size, which is why balances, token IDs, timestamps and hashes are all shaped like this.

Read the full uint256 reference →

Why the two padded rows differ

A 32-byte value can be padded from either side, and picking the wrong one silently changes the value. Numbers are left-padded (uint256), short strings are right-padded (bytes32), so the converter always shows both:

Input uint256 (left-padded) bytes32 (right-padded)
123 0x00…007b 0x7b00…00
hello 0x00…68656c6c6f 0x68656c6c6f…00

Common uses