Skip to main content

Solidity Storage Slot Calculator

Exact slot computation for variables, mappings, and dynamic arrays

Layout

0x59ee693a619e7d2eb8a46ce1db969b19e47ba4bd6dc07c02a9243bf3872ccc7b

Mapping value slot = keccak256(abi.encode(key) . p) with p = 0. This is the slot an SLOAD/eth_getStorageAt must target.

About the Storage Slot Calculator

Solidity storage layout is deterministic: each declared variable occupies a computed slot. Computing slots by hand (especially for mappings and dynamic arrays, where the slot is keccak256 of key and slot) is where audits go slowly.

This calculator mirrors solc layout rules for value types, mappings, arrays, and packed structs, and shows the exact slot and offset for each variable — the fastest way to write a storage-collision test or a getStorageAt probe.

How to use

  1. Paste the contract storage declarations.
  2. Each variable slot and byte offset is computed instantly.
  3. Use the slots with eth_getStorageAt to verify on-chain values.