Skip to main content

Struct Packing Visualizer

Build a Solidity struct and visualize how its members pack into 32-byte EVM storage slots with byte-level precision.

Quick Templates

Build Struct

Members (4)
1
addressowner20B
2
uint256totalSupply32B
3
uint8decimals1B
4
boolpaused1B
3
Slots
4
Members
54B
Used
42B
Wasted
Efficiency
56.3%

Storage Slots

Slot 020/32 bytes used(12B wasted)
owner
12B
address owner @ offset 0
Slot 132/32 bytes used
totalSupply
uint256 totalSupply @ offset 0
Slot 22/32 bytes used(30B wasted)
30B
uint8 decimals @ offset 0bool paused @ offset 1

Packing Efficiency

56.3%efficient
Total Slots3
Bytes Used54B
Bytes Wasted42B
Est. Gas Cost60,000 gas

Slot Map

MemberTypeSlotOffsetSize
owneraddress0020B
totalSupplyuint2561032B
decimalsuint8201B
pausedbool211B

Solidity packs struct members right-to-left within a 32-byte slot. Grouping small types together can save thousands of gas per transaction.

Previous: Array Storage Demo
Back to array storage demo