A Bitcoin transaction can have two different identifiers without representing two separate payments. This is easy to miss when a wallet, developer tool or support log displays both a transaction ID and a witness transaction ID.

The distinction is useful for reading records accurately. A txid identifies one serialization of the transaction, while a wtxid also commits to its witness data. Neither identifier, by itself, establishes that a payment has confirmed. The specifications and documentation below were checked on October 23, 2026.

Two identifiers, different input data

Bitcoin Core's SegWit wallet development guide defines both identifiers using double SHA-256 hashing. The txid uses the traditional transaction serialization. The wtxid uses the serialization that includes witness data, along with the marker and flag identifying that format.

Witness data contains material used to satisfy spending conditions, such as signatures and public keys. The exact contents depend on the kind of output being spent. Excluding that material from the txid does not make it optional for validating the spend.

Transactions without witness data have matching txids and wtxids. The SegWit peer-services specification, BIP 144, explains that their witness-inclusive hash uses the original serialization too. Two fields therefore do not always mean two different values.

The txid still identifies the output being spent

Bitcoin links transactions through outputs. A new transaction's input points to an earlier transaction and specifies which of that transaction's outputs it spends.

The Bitcoin developer reference calls this pair an outpoint: a txid plus an output index. Indexing starts at zero. If an earlier transaction has three outputs, its txid alone does not identify which one a later input consumes.

For a hypothetical payment transaction with a customer output at index zero and change at index one, those outputs share the same txid. Their indexes distinguish them. A later spend of the change references that txid and index one.

BIP 144 preserves the non-witness hash for these input references. Software cannot substitute the wtxid simply because it contains a commitment to more data. The protocol specifies which identifier belongs in that field.

Separating witness data helps stabilize references

Before SegWit, changes to signature-related transaction data could alter a transaction's ID without necessarily changing its economic effect. An unconfirmed child referencing the earlier ID could then lose the parent reference it expected.

BIP 141's motivation describes removing witness data from the transaction hash as a remedy for involuntary transaction malleability and an enabler of unconfirmed dependency chains. The important distinction is between changing the witness and changing the transaction's non-witness fields.

Changing an output amount, input reference or other committed non-witness field changes the txid. Transactions mixing legacy and SegWit inputs also require care; including a SegWit input does not give every input blanket protection. An ID should never be interpreted as a promise that an unconfirmed payment cannot be replaced.

Why peers also need the witness identifier

A stable reference is useful, but nodes exchanging transactions need to distinguish different witness data attached to the same non-witness transaction.

BIP 339 explains the problem. If a node rejects a transaction because its witness is invalid, remembering only the txid could also cause it to ignore a valid witness version later. Downloading every reannouncement avoids that mistake but wastes bandwidth.

The specification enables compatible peers to announce and request transactions by wtxid. A rejected witness version and a different witness version then have distinct identifiers, allowing more precise handling. This changes peer-to-peer relay behavior; it does not replace the txid used by an input to identify a previous output.

Compatibility is negotiated between peers. BIP 339 explicitly keeps older clients interoperable, so a statement that every transaction reference on the network is now a wtxid would be wrong.

Read the field name before comparing values

In Bitcoin Core 30.0's decoderawtransaction documentation, the returned txid field is accompanied by a field called hash, described as differing from txid for witness transactions. The tagged implementation populates hash from the witness hash. That generic-looking label can create confusion when values are copied into support notes or software databases.

A useful record states the identifier type, Bitcoin network and relevant output index, rather than saving an unlabeled string. For ordinary transaction identification, Bitcoin Core's SegWit wallet development guide retains txid as the primary identifier.

If two records disagree, first check whether they are comparing the same field. Then compare the decoded transaction and its status. Understanding the two identifiers can explain a mismatch; it cannot, on its own, establish receipt of funds or successful confirmation.