Glossary / Transactions & fees
Transaction ID
Also known as Txid, Transaction hash.
- Definition
- A transaction ID is the 64-character hexadecimal fingerprint of a bitcoin transaction, produced by hashing it twice with SHA-256, and it is how everyone refers to that payment.
Nobody assigns the identifier: it falls out of the transaction's own contents, so altering a single satoshi produces a completely different one. The value is 32 bytes long, printed as 64 hex characters and shown in reverse byte order by every explorer. It is the one string that lets you and an exchange support desk look at the same payment.
How it works
Deriving a transaction ID takes two steps and no secrets. The transaction is serialized into its raw byte form, then run through SHA-256 twice, and the resulting 32 bytes are the identifier. Anyone with the raw bytes computes the same answer, which is why an identifier cannot be reserved, requested, or faked.
Display order is the first thing that confuses people. Bitcoin hashes internally in one direction and prints them in the other, so the bytes you see on an explorer are the reverse of the bytes in the file. Nothing is wrong when a developer tool shows you a string that looks backwards.
SegWit split the identifier in two. Since BIP141 activated at block 481,824 on August 24, 2017, the transaction ID is computed over the transaction without its witness data, while a second identifier, the wtxid, covers everything including signatures. The reason is malleability: signatures could previously be re-encoded by anyone relaying the transaction, changing the identifier while leaving the money exactly where it was going. Mt. Gox blamed malleability for its missing coins in February 2014, but a study by Decker and Wattenhofer measured the actual attacks and found only 386 BTC could be attributed to malleability before the exchange stopped withdrawals, against the hundreds of thousands of coins it had lost.
The identifier is also what a block commits to. Every transaction ID in a block is hashed into the merkle root stored in the block header, so a miner cannot quietly swap one payment for another after the fact.
Why this matters when you buy bitcoin
The transaction ID is the only piece of evidence that survives the gap between two companies. When a withdrawal from Coinbase or Bitstamp has not arrived, the support ticket goes nowhere until you supply it, and once you have it you no longer need the ticket: paste the string into any block explorer and you can see the outputs, the fee, and the confirmation count for yourself. This is also the fastest way to learn whether the delay is the exchange's queue or the network's.
The reverse case is the dangerous one. A transaction ID proves that a payment exists, not that it was sent to you, not that it will confirm, and not that the sender was who they claim. Sellers on peer-to-peer marketplaces are routinely shown a screenshot of an explorer page and hand over goods before checking whether any output in that transaction pays an address they control. Check the address, check the amount, and check the confirmations, in that order.
Unconfirmed identifiers can also vanish. Full replace-by-fee is the default relay policy in modern Bitcoin Core, so a sender can broadcast a competing version of the same payment, and that version has a different identifier. Bitcoin Core also drops transactions it has held for more than 336 hours, or 14 days. An explorer saying "transaction not found" usually means one of those two things happened, not that your coins are gone.
Reading the genesis block's transaction ID
The oldest transaction ID in bitcoin is 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b, the single transaction in the block mined on January 3, 2009. Because that block contains one transaction and nothing else, the block's merkle root is the identical string, which is the clearest illustration of how the commitment works.
That transaction pays 50 BTC to a public key, and Bitcoin Core never added the output to its unspent set, so the identifier names money that can never move. It also carries the newspaper headline "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" inside its coinbase field.
The dependency runs one way. Change a single letter of that headline and both the transaction ID and the merkle root become unrecognizable, which is why an identifier is a fingerprint rather than a label. You cannot pick one, and you cannot edit a transaction without producing a new one.
Transaction ID vs bitcoin address
An address is a destination and a transaction ID is a record of an event. Addresses can be handed out in advance and reused; identifiers only exist after a transaction has been built. Sending coins to a transaction ID is impossible, and wallets reject the attempt because the string fails address checksum validation. Support impersonators exploit the confusion by asking for "your transaction ID" and then supplying an address of their own.
Transaction ID vs outpoint
A transaction ID names an entire transaction, which might pay 300 different people in a single exchange batch. An outpoint names one output inside it, written as the identifier, a colon, and the output index. Coin control screens, hardware wallet confirmations, and PSBT files all work in outpoints, so an identifier alone is not enough to say which coin you mean.