What Is a Hash in Crypto? Hashes and Transaction Hashes Explained
A hash in crypto is a fixed-length string of letters and numbers produced by running data through a hash function. The same input always gives the same hash, and any small change gives a completely different one. A transaction hash, also called a TxID, is the hash that identifies one transaction so you can look it up on a block explorer.
“Hash” shows up in two everyday places in crypto: the hash functions that secure blockchains, and the transaction hash you copy from a wallet or exchange to track a payment. They are related, and this page covers both.
Hash key facts
| What it is | The output of a hash function: a fixed-length “fingerprint” of some data |
| Same input | Always gives the same hash |
| Small change in input | Gives a completely different hash |
| Reversible? | No. You cannot work backward from a hash to the original data |
| Used for | Linking blocks, mining, addresses, and identifying transactions |
| Common functions | SHA-256 (Bitcoin) and Keccak-256 (Ethereum) |
How a hash function works
You feed any data into a hash function, whether a word, a file or a whole block, and it returns a string of a fixed length. For example, SHA-256 always returns 256 bits, usually shown as 64 hexadecimal characters, no matter how large the input is.
A good hash function has three properties:
- It is deterministic. The same input always produces the same output.
- It is one-way. Knowing the output tells you nothing practical about the input.
- It is sensitive. Changing one character of the input changes the whole output, so a tampered file is easy to spot.
What hashes do on a blockchain
- They link blocks. Each block contains the hash of the block before it. Changing an old transaction would change that block’s hash, which would break the link to every block after it. This is why history is hard to rewrite. See what a blockchain is for the full picture.
- They power proof of work. Miners repeatedly hash a block’s data with a different number added each time until the result meets the network’s difficulty target. Finding one takes huge amounts of computing work; checking one is instant. Read more in what is crypto mining.
- They help create addresses. Wallet addresses are derived from public keys using hash functions, so an address does not reveal the key itself.
- They identify transactions. Every transaction gets its own hash.
What is a transaction hash?
A transaction hash (also called a TxID, transaction ID or TxHash) is the unique identifier of one transaction. It is calculated from the transaction’s contents, so it cannot be assigned to two different transactions.
The format depends on the network. A Bitcoin TxID is 64 hexadecimal characters. An Ethereum transaction hash is 66 characters, which is 64 hexadecimal characters after a 0x prefix. Other networks use their own formats.
Where to find a transaction hash
- In your wallet app, in the transaction’s details.
- In an exchange’s withdrawal history, usually shown once the withdrawal has been broadcast. A withdrawal that is still processing may not have a hash yet.
- In your email or app notifications, where a service sends them.
How to use it
- Copy the hash. Copy the whole string, with no spaces.
- Open a block explorer for the right network. A Bitcoin hash will not be found on an Ethereum explorer. Our page on block explorers explains how they work.
- Paste it into the search box. The explorer shows the status, the number of confirmations, the sender and receiver addresses, the amount and the network fee.
If you cannot find a hash, check that you picked the right network and that the transaction has actually been broadcast. Newly sent transactions can take a short time to appear. Our page on what Kaspa is goes into its BlockDAG design, mining and risks.
Hash vs address vs private key
| Transaction hash | Wallet address | Private key | |
|---|---|---|---|
| Identifies | One transaction | A place to receive funds | Control of the funds |
| Safe to share? | Yes | Yes, when you want to be paid | Never |
| Where used | Tracking a payment | Receiving crypto | Signing transactions |
Sharing a transaction hash is safe. It lets others see that payment on a public chain but gives no control over your funds. It can, however, link your address to your activity, so share it only when needed. Never share a seed phrase or private key with anyone, including support staff.
Common questions
Is “hash rate” the same thing?
It is related. Hash rate is how many hashes a proof-of-work network, or a single miner, computes per second. A higher figure means more computing power securing the network.
Can a hash be reversed or decrypted?
No. Hashing is not encryption. There is no key that turns a hash back into the data. Someone can only guess inputs and compare the resulting hashes.
Why does my transaction hash show “pending”?
The transaction has been broadcast but is not yet in a block. A low network fee can leave it waiting longer. See what gas fees are for how fees affect speed.
Sources
- bitcoin.org supports: Hashes in proof of work and the chain of blocks
- ethereum.org supports: Ethereum transaction structure and transaction hash