Transaction ID (txid)

1 min read

A txid or Transaction ID is a string of letters and numbers that identifies a specific transaction on the blockchain. It can be used to look up a transaction on a node or block explorer.

An example of a txid is this id that belongs to the first transaction in Bitcoin’s Genesis block:


Note that while both a txid and a bitcoin address look like a long string of letters and numbers, they are not the same thing, and the two should never be mixed up.

On a technical level, a transaction ID is the double SHA-256 hash of a transaction.

When signing a transaction, it is the txid that is signed. Signing the txid ensures that if any part of the transaction changes, the transaction ID changes, and the signature is rendered invalid.

A txid is not always a hash of the entire transaction. Since a signature cannot sign itself, signatures are not included in the txid, and thus signatures can be changed after their creation, sometimes without being invalidated. Before SegWit, this allowed a txid to change after the transaction was signed, a problem called transaction malleability.