<p>You cannot do that.</p>

<p>The txid is not "chosen"; it is <strong>defined</strong> as the double-SHA256 of the transaction data (excluding the witness, when it is a segwit transactio ). Every node computes the txid independently.</p>

CC BY-SA 4.0
2018-11-15T00:20:15.037Z
Also worth mentioning -- All nodes will produce the same TXid as long as the transaction isn't "malleable". Same input in a hash function will always produce the same result. Custom/vanity TXids are technically possible if you brute force an ``OP_RETURN`` output but naturally can only contain A-F and 0-9.
Mason Ticehurst
CC BY-SA 4.0
2018-11-14T19:26:40.153Z
2018-11-14T19:26:40.153Z
Pieter Wuille
<p>I understand that TxIDs are simply the double hash of tx data. But who creates them? I assume that all the nodes create the TXIDs of the transactions on their own and the TxIDs are not transferred along with the tx data. I am asking this because I want to create custom TxIDs (for some application) for the Txs and do not want the IDs to be double hash of the tx data. Is it possible to do so, or would the nodes then reject my tx.</p>

<transaction-id>
Custom transaction IDs
archita
# Custom transaction IDs

(Asked by: username_0 on 2018-11-14)

I understand that TxIDs are simply the double hash of tx data. But who creates them? I assume that all the nodes create the TXIDs of the transactions on their own and the TxIDs are not transferred along with the tx data. I am asking this because I want to create custom TxIDs (for some application) for the Txs and do not want the IDs to be double hash of the tx data. Is it possible to do so, or would the nodes then reject my tx.

**Tags:** transaction-id


---

## 1 answers

### Answer by username_1 on 2018-11-14. Score: 0 | Accepted answer

You cannot do that.

The txid is not "chosen"; it is **defined** as the double-SHA256 of the transaction data (excluding the witness, when it is a segwit transactio ). Every node computes the txid independently.

> **Comments:**
> **username_2**: Also worth mentioning -- All nodes will produce the same TXid as long as the transaction isn't "malleable". Same input in a hash function will always produce the same result. Custom/vanity TXids are technically possible if you brute force an ``OP_RETURN`` output but naturally can only contain A-F and 0-9.  

---

