Every output is an amount in sats plus a locking script that says who can spend it next. Learn how outputs, addresses and output numbers fit together.
Amount plus lock
Every output has just two parts:
- Amount in satoshis, stored as an 8-byte number.
- Locking script (scriptPubKey): a tiny program saying what must be provided to spend it. Usually "a signature from the key with this hash", which wallets display as an address.
Output numbering
Outputs are numbered from 0. Output 0 of transaction abc… is written abc…:0. That reference is what a future input uses to spend it.
Types of locks
| Lock type | Address starts with | Lesson |
|---|---|---|
| Pay to public key hash | 1 | Pay to public key hash (P2PKH) |
| Pay to script hash | 3 | Pay to script hash (P2SH) |
| Pay to witness public key hash | bc1q | Segregated Witness (SegWit) |
| Pay to Taproot | bc1p | Taproot |
| Data only (unspendable) | none | OP_RETURN data outputs |
Two outputs in block 170
The Satoshi to Hal Finney transaction has output 0 for 10 BTC (to Hal) and output 1 for 40 BTC (change back to Satoshi). Both use the early pay-to-public-key lock, Pay to public key (P2PK).
How outputs become addresses
The wallet you pay doesn't send you its locking script. It sends an address, and your wallet turns that address back into the script:
Spent or unspent?
An output's status is either unspent (a UTXO, still spendable) or spent by a later input. Once spent, it can never be spent again. On MyBitcoinExplorer, every transaction page lists each output's number, amount and address, so you can see exactly which outpoint a later input refers to.
Key takeaways
- An output is an amount in sats plus a locking script.
- Outputs are referenced as txid:index.
- The locking script type determines the address format.
Common questions
Can an output have zero value?
Yes, OP_RETURN data outputs usually carry zero sats. Spendable outputs below the dust limit are non-standard.
Is an address stored in the output?
No, the locking script is stored. The address is just a readable encoding of it.
What is a scriptPubKey?
The technical name for an output's locking script.
How many outputs can a transaction have?
There's no fixed number; it's limited by transaction size and block weight. Batch payouts can have hundreds.