Skip to main content
POST
/
66f812de2a6724a75a51f60dd6f2a154
debug_preimage
curl --request POST \
  --url https://nd-954-882-037.p2pify.com/66f812de2a6724a75a51f60dd6f2a154 \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "debug_preimage",
  "params": [
    "0x0000000000000000000000000000000000000000000000000000000000000000"
  ]
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": "<string>"
}
Arbitrum API method that returns the preimage for a given Keccak-256 hash. In Ethereum’s state trie, account addresses are stored as their Keccak-256 hashes. This method allows retrieving the original data (preimage) that was hashed. The node must have preimage recording enabled for this method to return results.
Learn how to deploy a node with the debug and trace API methods enabled.
This method is available for post-Nitro blocks only (block 22,207,815 and later). For pre-Nitro blocks, use the arbtrace_* methods instead.
Preimage recording must be enabled on the node (--cache.preimages). If preimages are not stored, this method returns an error.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • hash — the Keccak-256 hash to look up the preimage for, encoded as a hex string.

Response

  • data — the raw preimage bytes as a hex string. Returns an error if the preimage is not found.

debug_preimage code examples

const ethers = require('ethers');
const NODE_URL = "YOUR_CHAINSTACK_ENDPOINT";
const provider = new ethers.JsonRpcProvider(NODE_URL);

const debugPreimage = async (hash) => {
  const result = await provider.send("debug_preimage", [hash]);
  console.log(result);
};

debugPreimage("0x0000000000000000000000000000000000000000000000000000000000000000");

Use case

The debug_preimage method is useful for resolving Keccak-256 hashes back to their original values. In the state trie, account addresses and storage keys are stored as hashes. This method allows developers building state analysis tools to reverse-lookup hashes to their original addresses or data, which is essential for tools like state diff visualizers and trie explorers.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:debug_preimage
params
string[]

The Keccak-256 hash to look up the preimage for.

Response

200 - application/json

Returns the preimage for the given hash.

jsonrpc
string
id
integer
result
string
Last modified on March 13, 2026