LearnBitcoin

Glossary

Output (Transaction Output)

Specifies an amount of BTC and a script (locking script) determining how it can be spent. Outputs become UTXOs until spent.

A transaction output specifies an amount of BTC and a locking script (technically the scriptPubKey) that defines what's required to spend it later. Once the transaction confirms, the output becomes a UTXO in the global unspent set, sitting on the chain until someone produces a transaction input that satisfies its script.

On the wire, each output is two fields: an 8-byte value in satoshis, followed by a length-prefixed locking script. Outputs are ordered within a transaction; the position of each output (the vout index, starting at 0) becomes part of its permanent identity. Future spends reference an output as the pair (txid, vout).

The locking script can be simple ("the holder of this private key can spend") or arbitrarily complex (multisig, time-locked, hash-locked, or general Bitcoin Script logic). A handful of standard patterns dominate practice:

  • P2PKH - legacy addresses starting with 1. Spend by revealing a public key plus a matching signature.
  • P2SH - addresses starting with 3. Spend by revealing a redeem script (which itself defines the real spending conditions) and its satisfying data.
  • P2WPKH - SegWit addresses starting with bc1q.... Native-SegWit equivalent of P2PKH.
  • P2WSH - SegWit addresses starting with bc1q... (longer: 62 characters instead of 42). Native-SegWit equivalent of P2SH.
  • Taproot (P2TR) - addresses starting with bc1p.... Adds key-path and script-path spending with Schnorr signatures.

Outputs are indivisible. You can't spend half a UTXO; you spend the whole thing and direct the leftover back to yourself in a new change output. This is why most transactions you make have two outputs: one to the actual recipient, one back to your own wallet.

Two special cases worth knowing:

  • Dust outputs. Outputs worth less than the fee it would take to spend them (546 sats for a legacy output, 294 for P2WPKH, 330 for Taproot at Bitcoin Core's default dust rate of 3 sat/vB) are non-standard - the default relay policy refuses to relay or mine them. See dust limit.
  • OP_RETURN outputs. A locking script starting with OP_RETURN is provably unspendable. They normally carry zero satoshis and exist only to embed data - protocol metadata, attestations, sidechain anchors - without bloating the UTXO set.

Key takeaways

  • Defines the recipient and spending conditions
  • Becomes a UTXO once confirmed, awaiting future spending
  • ScriptPubKey can be single-sig, multisig, or advanced script

Sources (6)

Related terms (8)

Published . Revised . No corrections logged for this page.

Edit this page on GitHub