Bitcoin's scripting language has an opcode named OP_RETURN
whose explicit job is to make a script fail. An output that begins with
OP_RETURN is unspendable by anyone, ever. Bitcoin Core marks these
outputs as provably-unspendable and skips them when building the
UTXO set. They cost block space, they pay no rent, they confer no
economic right. And yet they have become Bitcoin's most important
extension point.
Why does this exist?
For Bitcoin's first five years, people who wanted to embed arbitrary data on chain (timestamping services, alt-protocol bootstraps, image enthusiasts) did so by encoding bytes as fake Bitcoin addresses, sending tiny amounts to those addresses, and accepting that the bitcoin would be lost forever. This worked, but it left junk in the UTXO set forever, because nodes had to keep track of those outputs in case someone (impossibly) showed up with the matching private key.
Bitcoin Core 0.9 (March 2014) introduced standardness rules that accepted OP_RETURN outputs as a "real" way to embed data. The deal: if you mark your data output with OP_RETURN, bitcoind will see that it's unspendable, exclude it from the UTXO set entirely, and accept your transaction as standard. Initially the limit was 40 bytes. Bitcoin Core 0.11 (July 2015) raised it to 80 bytes, and that ceiling stood for a decade. Bitcoin Core 30.0 (October 10, 2025) raised the default to 100,000 bytes, which in practice leaves the transaction size limit as the only cap, and began relaying transactions with more than one OP_RETURN output. Bitcoin Knots kept a small default. None of this is consensus: it is relay policy, and a miner has always been free to include a larger OP_RETURN.
What an OP_RETURN looks like
The script is just OP_RETURN <data bytes>. Pull
a block from the inscription era (height 800,000, July 2023) and
look for outputs of type nulldata:
In the verbose-2 output, look for outputs whose
scriptPubKey.type is nulldata. Their
asm field starts with OP_RETURN followed
by the hex bytes. Decode those bytes (often UTF-8 text or a
protocol-specific binary format).
What protocols use it
Once OP_RETURN became standard, an entire ecosystem of "second-layer" protocols adopted it to use Bitcoin as a settlement layer for non-payment data:
- OpenTimestamps. Aggregates a Merkle tree of arbitrary documents, embeds the root hash in an OP_RETURN. Anyone can later prove their document existed at the moment that block was mined. In 2017 it timestamped the entire Internet Archive, about 750 million files, through a single Bitcoin transaction.
- Counterparty. A platform for issuing custom assets on Bitcoin. Token transfers can be encoded into OP_RETURN bytes (larger payloads use bare multisig). Powered the early Rare Pepe trading-card scene.
- VeriBlock. A separate blockchain whose "Proof-of-Proof" miners publish its state into Bitcoin OP_RETURNs so it inherits Bitcoin's proof-of-work security. At its early-2019 peak it generated up to about 20% of Bitcoin's daily transactions, and roughly one in eight of all transactions between September 2018 and the end of 2019 (58% of all OP_RETURN transactions in that window).
- Omni Layer. Tether's original home on Bitcoin. Omni transactions, almost all of them USDT transfers, were about 40% of all OP_RETURN transactions between September 2018 and the end of 2019.
- Factom, Komodo, Blockstore, notary services, election audit trails, and dozens of smaller projects that need a permanent timestamped public record.
Each protocol has its own envelope format. Most start with a short
"magic number" or ASCII tag, like omni (Omni) or
OA (Open Assets: the bytes 4f41 plus a two-byte
version), so you can identify which protocol owns a given OP_RETURN
by the first few bytes of its data. Counterparty is the exception:
its CNTRPRTY tag is there, but the whole payload is
scrambled with ARC4 keyed by the transaction's first input txid, so
you only see the tag after you unscramble it.
The aggregate footprint
Modern Bitcoin blocks contain a meaningful but minority share of OP_RETURN-using transactions. Compare a block from April 2024 to one from March 2015, before OP_RETURN traffic took off:
Both blocks are valid. Both follow the same consensus rules. The second one carries vastly more diverse data because the protocol layer above it has matured to use Bitcoin as a settlement substrate for many things beyond just payments.
The debate that never quite settled
Many Bitcoin Core developers were skeptical of OP_RETURN as a feature. The argument: Bitcoin's job is to be money, and cluttering blocks with arbitrary data drives up fees for normal payments. The counter-argument: Bitcoin's job is to be uncensorable settlement, and "what counts as a payment vs. data" is exactly the kind of judgement Bitcoin's design avoids making. If you're paying the fee, you're entitled to the bytes.
For ten years the 80-byte limit was a soft compromise: enough to be useful for timestamping and protocol commitments, not so much that you could embed full images. (Inscriptions, which use the witness path instead of OP_RETURN, sidestepped the limit entirely while it stood. That's a different story: Ordinals.)
In 2025 the argument flared again. A June 6, 2025 statement from Bitcoin Core contributors said relay policy is not a tool for mandating how Bitcoin is used, and that refusing to relay what miners include anyway just pushes the data into other channels. Bitcoin Core 30.0 (October 10, 2025) raised the default OP_RETURN size limit to 100,000 bytes. Bitcoin Knots kept a small limit, so the relay limit a node enforces depends on which software it runs.
Sources
- Bitcoin Core 0.9.0 release notes, Bitcoin Core project, March 19, 2014. The release that made OP_RETURN outputs standard, as a prunable alternative to the forever-unspendable fake outputs used before it.
- script: reduce OP_RETURN standard relay bytes to 40 (bitcoin/bitcoin PR #3737), Jeff Garzik, merged February 26, 2014. The pre-release change that set Bitcoin Core 0.9.0's 40-byte OP_RETURN data limit.
- Bitcoin Core 0.11.0 release notes, Bitcoin Core project, July 12, 2015. The changelog entry that raised the default maximum OP_RETURN size to 80 bytes.
- Bitcoin Core 30.0 release notes, Bitcoin Core project, October 10, 2025. The
-datacarriersizedefault raised to 100,000 bytes, counted across all OP_RETURN outputs in a transaction, with-datacarriersize=83(80 data bytes plus the opcode and push bytes) as the way to revert. - Bitcoin Core development and transaction relay policy, Bitcoin Core contributors (31 signatories), June 6, 2025. The statement that refusing to relay transactions miners would include anyway forces users into other channels.
- Bitcoin Knots v29.2.knots20251110 release, Luke Dashjr, November 10, 2025. Knots keeping a small OP_RETURN relay default (83 bytes, with a stated plan to return to 42).
- How OpenTimestamps Carbon Dated (almost) The Entire Internet With One Bitcoin Transaction, Peter Todd, May 25, 2017. The Internet Archive timestamp: about 750,000,000 files through one Bitcoin transaction.
- OpenTimestamps: Scalable, Trust-Minimized, Distributed Timestamping with Bitcoin, Peter Todd, September 15, 2016. How pending digests are combined into a single Merkle tree whose root is committed to Bitcoin.
- Dominating OP Returns: The Impact of Omni and Veriblock on Bitcoin (BRL Working Paper No. 7), Elias Strehle and Fred Steinmetz, Blockchain Research Lab, March 10, 2020. The September 2018 to December 2019 census of OP_RETURN use: VeriBlock's and Omni's shares, VeriBlock's daily peak, the
omniprefix, and the five protocols above 1,000 transactions a month. - Proof-of-Proof and VeriBlock Blockchain Protocol Consensus Algorithm and Economic Incentivization Specifications, v1.0, VeriBlock, Inc., undated (describes the chain as of December 2018). VeriBlock as its own blockchain whose Proof-of-Proof miners publish its data into Bitcoin OP_RETURN outputs.
- Counterparty Protocol Specification, Counterparty developers, read October 5, 2026. Counterparty data carried in OP_RETURN outputs, prefixed with CNTRPRTY and obfuscated with ARC4 keyed by the first input's txid.
- A Brief History of Rare Pepe, Martin Lukas Ostachowski, Right Click Save, January 14, 2022. Secondary source for the Rare Pepe cards issued on Counterparty from September 2016.
- Open Assets Protocol specification, Flavien Charlon, December 12, 2013. The marker output: OP_RETURN, the bytes 0x4f41 ("OA"), then a two-byte version.
Read more: The Genesis Block, The Halvings, or The Patoshi Pattern.