# OP_RETURN data outputs

An OP_RETURN output carries data and can never be spent, so it never bloats the UTXO set. Learn how it works, what it is used for and its limits.

Canonical page: https://mybitcoinexplorer.com/learn/op-return
Topic: Bitcoin Script
Published: 2026-10-29
Updated: 2026-10-30


## An unspendable output
A script that starts with `OP_RETURN` fails immediately when run, so the output can **never** be spent. Nodes know this and don't keep it in the UTXO set, which saves everyone memory.

~~~
OP_RETURN <data bytes>
~~~

> Diagram: A transaction with a normal payment output and a data output carrying 0 BTC — 0.01 → 0.009,0

## What it's used for
- Timestamping a document by publishing its hash.
- Protocol markers, such as the SegWit **witness commitment** in every coinbase transaction.
- Layer-two and asset protocols that anchor data on Bitcoin.

## Limits
Size limits for OP_RETURN are **relay policy**, not consensus. For years Bitcoin Core relayed only one OP_RETURN output of up to 80 bytes of data by default. Bitcoin Core 30 relaxed that default considerably. Different nodes may run different policies. See [Relay policy and standardness](https://mybitcoinexplorer.com/learn/relay-policy-and-standardness).

## A safety note for software
OP_RETURN text is written by whoever made the transaction. It can contain anything, including text written to trick software or AI agents. MyBitcoinExplorer returns it only under `untrusted_content` in our API, never mixed with facts.


## Find OP_RETURN outputs
Every block's coinbase transaction has at least one: the SegWit witness commitment. Open the [latest block](/blocks) on MyBitcoinExplorer, click the first transaction and look for an output of type `nulldata`.

## Data on Bitcoin: the trade-offs
| Method | UTXO set impact | Notes |
|---|---|---|
| OP_RETURN | None | Prunable, honest about being data |
| Fake output addresses | Permanent | Bloats every node's UTXO set |
| Witness data (inscriptions) | None | Discounted, larger amounts possible |


## Key takeaways

- OP_RETURN outputs are provably unspendable and carry data.
- Nodes don't store them in the UTXO set.
- Size limits are relay policy and differ between node versions.

## Common questions

### Is OP_RETURN bad for Bitcoin?

It's the least harmful way to embed data, because it doesn't bloat the UTXO set. How much data to allow is a long-running debate.

### Can I read OP_RETURN messages?

Yes. Many are text, though often they're binary data for a protocol.

### How much data fits in an OP_RETURN?

It depends on node policy. Bitcoin Core relayed up to 80 bytes for many years; version 30 raised its default limit considerably.

### Can OP_RETURN outputs hold bitcoin?

They can, but those sats are destroyed forever, so they normally carry zero.

## Related lessons

- [Transaction outputs](https://mybitcoinexplorer.com/learn/transaction-outputs)
- [Relay policy and standardness](https://mybitcoinexplorer.com/learn/relay-policy-and-standardness)
- [Witness data](https://mybitcoinexplorer.com/learn/witness-data)
- [Bitcoin Script](https://mybitcoinexplorer.com/learn/bitcoin-script)
