A transaction hash (tx hash) is a 32-byte identifier for one blockchain transaction. On Ethereum it is the keccak256 hash of the signed transaction bytes, written as 0x plus 64 hexadecimal characters. You use it to find the transaction in a block explorer or to get its status and receipt over RPC.
You send a transaction and your wallet gives you a long hex string. Support asks you for it, your backend stores it, and the explorer page loads from it. This guide explains how nodes compute that hash and when it exists. It also compares it with a block hash and an address, and shows how to look one up in an explorer and over JSON-RPC.
What Is a Transaction Hash?
A transaction hash is the output of a hash function applied to the bytes of a signed transaction. If one byte of the transaction changes, the hash changes. This makes the hash a fingerprint that identifies one exact transaction.
Different ecosystems use different names for the same idea:
- Transaction hash or tx hash: Ethereum and other EVM chains.
- Transaction ID or txid: Bitcoin and Tron.
- Extrinsic hash: Polkadot and other Polkadot SDK chains.
What Does a Transaction Hash Look Like?
An Ethereum transaction hash is 32 bytes, shown as 0x and 64 hex characters:
0xbfb0266d514bb4205086a064ec00526dc20ac845259c23073dbb69459f17f605| Chain | Name | Format |
|---|---|---|
| Ethereum and EVM chains | Transaction hash | 0x + 64 hex characters |
| Bitcoin | txid | 64 hex characters, no 0x |
| Tron | txID | 64 hex characters, no 0x |
| Aptos | Transaction hash | 0x + 64 hex characters |
Do not confuse a transaction hash with an address. An Ethereum address is 20 bytes (0x + 40 hex characters). A 64-character value is a hash, not an account.
How Is a Transaction Hash Calculated?
Ethereum and EVM Chains
The hash is keccak256 over the signed transaction, as the network sends it. The Ethereum execution specs define two cases:
- Legacy transactions:
keccak256(rlp(tx)). The RLP list includes the signature fieldsv,rands. - Typed transactions (EIP-2718):
keccak256(TransactionType || TransactionPayload). The type byte is0x01for access-list transactions,0x02for EIP-1559 transactions,0x03for blob transactions and0x04for EIP-7702 transactions.
We checked this with the example hash above. eth_getRawTransactionByHash returned bytes that start with 0x02, and keccak256 of those bytes is equal to the hash.
Keccak256 is not the same function as the standardized SHA3-256. They use different padding and give different outputs.
Bitcoin
A Bitcoin txid is the double SHA-256 (SHA-256 applied two times) of the transaction serialization. Since SegWit (BIP141), the txid excludes witness data. A second ID, the wtxid, includes it.
Bitcoin Core RPCs and most explorers show the txid with its bytes in reverse order. This is "RPC byte order". Blocks store the same hash in "internal byte order". If a txid from raw block data does not match an explorer, reverse the bytes.
When Does a Transaction Get Its Hash?
A transaction has its hash when you sign it, before you broadcast it. The hash depends only on the signed bytes, so your library can compute it locally. eth_sendRawTransaction returns the same hash as its result.
A hash does not prove that a block includes the transaction. The transaction can still wait in the mempool or leave it, and another transaction with the same nonce can replace it. Check the receipt before you treat it as final.
Transaction Hash vs Block Hash vs Address
| Identifier | What it identifies | Ethereum format | RPC method |
|---|---|---|---|
| Transaction hash | One signed transaction | 32 bytes, 0x + 64 hex | eth_getTransactionByHash |
| Block hash | One block (hash of the block header) | 32 bytes, 0x + 64 hex | eth_getBlockByHash |
| Address | One account or contract | 20 bytes, 0x + 40 hex | eth_getBalance |
A transaction hash and a block hash have the same length. If an explorer search shows a block, you pasted a block hash.
How Do You Look Up a Transaction Hash in an Explorer?
- Open the explorer for the chain that the transaction used, for example Etherscan for Ethereum mainnet. A hash from Base does not show on the Ethereum explorer.
- Paste the hash into the search box.
- Read the status, block number, from and to addresses, value and fee.
The blockchain explorer guide explains how explorers index this data from nodes. For other chains, use the explorer for that chain, for example Tronscan for Tron or Subscan for Polkadot.
How Do You Look Up a Transaction Hash Over RPC?
An explorer reads from its own database. Your application can ask a node directly over JSON-RPC. Two methods cover most cases.
eth_getTransactionByHash
eth_getTransactionByHash returns the transaction that the sender signed:
curl -X POST https://api-ethereum-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByHash","params":["0xbfb0266d514bb4205086a064ec00526dc20ac845259c23073dbb69459f17f605"]}'Response (signature fields removed):
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"type": "0x2",
"chainId": "0x1",
"nonce": "0xcfa03",
"gas": "0x61a8",
"maxFeePerGas": "0x8049509b",
"maxPriorityFeePerGas": "0x3b9aca00",
"from": "0xb42f812a44c22cc6b861478900401ee759ebead6",
"to": "0xb616064c03e9204441af233723a037f7b7794733",
"value": "0x3a306934975a7",
"input": "0x",
"hash": "0xbfb0266d514bb4205086a064ec00526dc20ac845259c23073dbb69459f17f605",
"blockHash": "0x02085c8f00ae515b831ee76129833877028473ea4a6dd1aca88fb5729c120bae",
"blockNumber": "0x1919d39",
"transactionIndex": "0x4"
}
}While the transaction is pending, blockHash, blockNumber and transactionIndex are null. If the node does not know the hash, result is null.
eth_getTransactionReceipt
eth_getTransactionReceipt returns the result of execution. Use the same request with the method name changed:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"type": "0x2",
"status": "0x1",
"transactionHash": "0xbfb0266d514bb4205086a064ec00526dc20ac845259c23073dbb69459f17f605",
"blockNumber": "0x1919d39",
"gasUsed": "0x523f",
"effectiveGasPrice": "0x3e29ba74",
"logs": [],
"contractAddress": null
}
}Read the result like this:
null: no block includes the transaction yet, or the node does not know it."status": "0x1": the transaction succeeded."status": "0x0": the transaction reverted. It is still in a block, it still used its nonce, and the sender still paid for the gas.
contractAddress has a value only when the transaction deployed a contract. To wait for confirmation, poll the receipt until it is not null, then wait for the number of blocks that your application needs.
Why Did My Transaction Hash Disappear?
A hash that showed as pending can later return null. The usual causes are:
- A new transaction replaced it. A wallet's "speed up" or "cancel" sends a new transaction with the same nonce and a higher fee. The new transaction has a new hash. Nodes that accept the replacement remove the old transaction, so the old hash returns
null. Some explorers label it "Dropped & Replaced". - A node dropped it. Each node keeps its own mempool and can evict low-fee transactions when the pool is full. Geth drops queued transactions (transactions with a nonce gap) after 3 hours by default. If someone broadcasts a dropped transaction again, a block can still include it later. To make sure it never executes, replace it.
- The wrong network. A testnet hash does not show on mainnet, and a hash from one L2 does not show on another.
- The node does not index old transactions. Geth keeps the transaction index for the last 2,350,000 blocks by default (about 11 months on Ethereum). A node with a shorter limit returns
nullfor older hashes.
How Do Transaction Hashes Differ on Non-EVM Chains?
- Bitcoin: the txid is double SHA-256 without witness data, shown in reverse byte order. Use
getrawtransactionon a Bitcoin node. For a transaction in a block, the node needs-txindex=1, or you pass the block hash. - Tron: the txID is the SHA-256 of the transaction's
raw_data, which does not include the signature. We checked this on a live Tron block. Look one up withwallet/gettransactionbyid. - Aptos: the hash uses the same
0x+ 64 hex format. Each transaction also has a sequential version number. Look one up withtransactions_by_hash. - Polkadot SDK chains: the Polkadot docs state that transaction hashes are not unique. If the chain removes an account and someone funds it again later, its nonce resets to 0. The same transaction can then be valid again with the same hash. Store the block number and extrinsic index, not only the hash.
Frequently Asked Questions
What is a transaction hash?
A transaction hash (tx hash, or txid on Bitcoin) is a 32-byte identifier for one blockchain transaction. On Ethereum it is the keccak256 hash of the signed transaction bytes, shown as 0x followed by 64 hexadecimal characters. You use it to find the transaction in a block explorer or to get its details and receipt over RPC.
How do I find my transaction hash?
Your wallet shows it in the activity or history view, usually as a link to a block explorer. Libraries such as ethers.js and viem return it when you send a transaction, and the eth_sendRawTransaction RPC method returns it as its result.
How do I check a transaction hash?
Paste it into the block explorer for the correct chain, for example Etherscan for Ethereum mainnet. From code, call eth_getTransactionByHash for the transaction fields and eth_getTransactionReceipt for the result. A receipt with status 0x1 means the transaction succeeded, 0x0 means it reverted, and null means no block includes it yet.
Is a transaction hash the same as a transaction ID?
Yes. Ethereum and most EVM tools say transaction hash or tx hash. Bitcoin and Tron say transaction ID or txid. In all cases the value is a hash of the transaction data that identifies the transaction.
Why does my transaction hash show as not found?
The most common cause is the wrong network in the explorer. Another cause is a transaction that left the mempool before a block included it. A replacement transaction with the same nonce and a higher fee also has a new hash, so the old hash disappears. Some nodes also do not index very old transactions. Geth keeps the transaction index for the last 2,350,000 blocks by default.
Can two transactions have the same hash?
On Ethereum, no, because the signed data includes the sender nonce. Bitcoin had two duplicate coinbase txids in 2010, and BIP30 has forbidden duplicates since 2012. On Polkadot SDK chains, two valid transactions can share a hash, so you identify a transaction by block number and extrinsic index.
Conclusion
A transaction hash identifies one signed transaction, and it exists before any block includes it. On Ethereum it is keccak256 of the signed bytes. On Bitcoin it is double SHA-256, shown in reverse byte order. To track a transaction in code, call eth_getTransactionByHash for the fields and eth_getTransactionReceipt for the result, and handle null as a normal state.
Dwellir runs RPC endpoints for 140+ chains, with HTTPS and WebSocket URLs for Ethereum. Create a free account to get an API key and run the requests above.




