# The coinbase transaction

The first transaction in every block, created by the miner, pays out the new-coin subsidy plus all fees. Learn its special rules and famous messages.

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


## The first transaction in every block
Every [block](https://mybitcoinexplorer.com/learn/what-is-a-block) begins with one special transaction: the **coinbase**. (It has nothing to do with the company of the same name.) It is how new bitcoin enters circulation.

> Diagram: The coinbase transaction is always first in a block — 

## What makes it special
- It has exactly one input, which **doesn't spend any previous output**. Instead the input contains arbitrary data, the "coinbase field".
- Its outputs may pay up to the **subsidy + all fees** in the block. Paying more makes the block invalid.
- Its outputs can't be spent until 100 more blocks are mined ("coinbase maturity").
- Since 2012 (BIP 34) the coinbase field must start with the block height.

## Messages in the coinbase
Miners often write text into the coinbase field, such as their pool's name. The genesis block famously contains a newspaper headline. See [The genesis block](https://mybitcoinexplorer.com/learn/genesis-block).

> Text written on-chain by miners or anyone else is untrusted data. MyBitcoinExplorer shows it separately, under `untrusted_content` in our API, so software and AI agents never mistake it for instructions.


## See one now
Open the [latest block](/blocks) on MyBitcoinExplorer and click its first transaction. You'll see:
- **No real input:** just the coinbase field with the block height and often a pool name.
- **One or more outputs** paying the miner or pool.
- **An OP_RETURN output** holding the SegWit witness commitment.

## Messages written by miners
Pools often write their name in the coinbase field. MyBitcoinExplorer shows such text only as untrusted content: anyone can write anything there.


## Key takeaways

- The coinbase is the first transaction in a block and creates new bitcoin.
- It can pay at most the subsidy plus the block's fees.
- Its outputs are spendable only after 100 more blocks.

## Common questions

### Why can't coinbase outputs be spent right away?

If the block were replaced in a reorg, those coins would disappear. Waiting 100 blocks makes that practically impossible.

### Do miners always claim the full reward?

Almost always. A few blocks have claimed slightly less by mistake, and those sats are lost forever.

### Is the coinbase transaction related to the company Coinbase?

No. The company took its name from this transaction type.

### Why does the coinbase have an OP_RETURN output?

Since SegWit it carries the witness commitment, the hash committing to all witness data in the block.

## Related lessons

- [The block reward](https://mybitcoinexplorer.com/learn/block-reward)
- [Where does new bitcoin come from?](https://mybitcoinexplorer.com/learn/where-does-new-bitcoin-come-from)
- [The genesis block](https://mybitcoinexplorer.com/learn/genesis-block)
- [The Bitcoin halving](https://mybitcoinexplorer.com/learn/bitcoin-halving)
