home / ethereum / packed-storage-slot-decoderlocal
Packed Storage Slot Decoder
Split one 32-byte storage slot into the packed variables it holds, such as uint128, uint64 and bool.
packed-storage-slot-decoderready · runs in this browser
Runs locally in your browser. Nothing you type is sent anywhere.
ethereum tools · free · runs in your browser · no sign-up · no wallet
01 // about this tool
Solidity packs small variables into one 32-byte slot, starting from the lowest bytes. Reading a slot with eth_getStorageAt gives one big number; this splits it back into the variables.
02 // how to use it
- Paste the slot value from eth_getStorageAt.
- List the variables that share the slot, in the order they are declared.
- Press Run.
03 // faq
Which variable is first?
The first declared sits in the lowest-order (rightmost) bytes.
What about mappings and arrays?
They never pack; use the storage slot calculator to find where their data lives.