# Transaction outputs

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.

Canonical page: https://mybitcoinexplorer.com/learn/transaction-outputs
Topic: Transactions
Published: 2026-10-29
Updated: 2026-10-30


## Amount plus lock
Every output has just two parts:

> Diagram: The fields of one output — Amount (sats):8,Locking script:var

- **Amount** in [satoshis](https://mybitcoinexplorer.com/learn/satoshis-and-bitcoin-units), 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](https://mybitcoinexplorer.com/learn/bitcoin-addresses).

## Output numbering
Outputs are numbered from 0. Output 0 of transaction `abc…` is written `abc…:0`. That reference is what a future [input](https://mybitcoinexplorer.com/learn/transaction-inputs) 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)](https://mybitcoinexplorer.com/learn/p2pkh) |
| Pay to script hash | 3 | [Pay to script hash (P2SH)](https://mybitcoinexplorer.com/learn/p2sh) |
| Pay to witness public key hash | bc1q | [Segregated Witness (SegWit)](https://mybitcoinexplorer.com/learn/segwit) |
| Pay to Taproot | bc1p | [Taproot](https://mybitcoinexplorer.com/learn/taproot) |
| Data only (unspendable) | none | [OP_RETURN data outputs](https://mybitcoinexplorer.com/learn/op-return) |

### Worked example: Two outputs in block 170
The [Satoshi to Hal Finney transaction](/tx/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16?block=00000000d1145790a8694403d4063f323d499e655c83426834d4ce2f8dd4a2ee) 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)](https://mybitcoinexplorer.com/learn/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:

> Diagram: From address to output — Address: bc1q… → (decode)Script: witness v0 + key hash → *Output: amount + 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.

## Related lessons

- [Transaction inputs](https://mybitcoinexplorer.com/learn/transaction-inputs)
- [Bitcoin Script](https://mybitcoinexplorer.com/learn/bitcoin-script)
- [Bitcoin address types compared](https://mybitcoinexplorer.com/learn/address-types)
- [UTXOs: how Bitcoin balances really work](https://mybitcoinexplorer.com/learn/understanding-utxos)
