← Bitcoin Encyclopedia

OP_RETURN

🌿 Intermediate

💡 The Plain-English Definition

OP_RETURN is a Bitcoin script opcode — a command in Bitcoin’s scripting language — that marks a transaction output as provably unspendable. That lets a small amount of data be permanently embedded in the blockchain without bloating the UTXO set (the collection of all currently spendable coins). It’s the mechanism behind Ordinals inscriptions, Runes tokens, and many other ways of putting data on Bitcoin.

🤔 But Why Though?

Bitcoin’s Script language — the simple programming language that sets the conditions for spending bitcoin — includes an opcode called OP_RETURN. When a transaction output starts with OP_RETURN, the network immediately knows that output can never be spent: it’s a data carrier, not a payment. Because it’s provably unspendable, full nodes — computers that independently validate the blockchain — can drop it from the UTXO set after processing, keeping that set lean.

That’s the key efficiency property. Unlike other ways of embedding data that leave junk UTXOs behind (as BRC-20 tokens did), OP_RETURN data is prunable — nodes can discard it without losing any ability to validate the chain. The original limit on OP_RETURN data was 80 bytes, set to stop the blockchain becoming a general-purpose data store. That was enough for timestamps, document fingerprints, and small metadata, the intended uses. Then Bitcoin Core 30.0, released in October 2025, removed the 80-byte limit after a long community debate, allowing arbitrary amounts of data in OP_RETURN outputs.

The removal was controversial. One camp argued it simply removes needless friction for legitimate uses (Ordinals, Runes, timestamps) without real harm — if miners include the transactions anyway, the data ends up on-chain regardless of any node’s policy. The other camp, led by developers like Luke Dashjr (who maintains Bitcoin Knots, an alternative Bitcoin implementation), argued that removing the limit normalises using Bitcoin as a general data store, which increases the blockchain’s size and the cost of running a node, and dilutes Bitcoin’s purpose as a monetary network.

🌍 The Real-World Analogy

Think of OP_RETURN like a comments section in a legal document. The main body holds the actual agreements (the Bitcoin transactions — who sends what to whom). The comments section can hold notes, references, and metadata — useful context, but not part of the enforceable agreement. And unlike a handwritten note in the margin, OP_RETURN data is permanently bound into the document, readable by anyone who examines it, with the filing system explicitly noting “this section is not an agreement, just data.”

⚡ So What?

OP_RETURN is the battleground for one of Bitcoin’s most fundamental ongoing debates: what is block space actually for? Understanding it explains why Ordinals and Runes are technically possible, why some Bitcoin developers oppose them, and why Bitcoin Core’s 2025 decision to remove the byte limit mattered so much to both sides. For holders, it’s useful context for the fee market — data-heavy periods drive fee spikes — and for making sense of Bitcoin’s evolving role beyond pure monetary transactions.

📩 The Daily Bit · free

Get one plain-English Bitcoin email each morning.

The Daily Bit — free, two minutes, unsubscribe anytime.

The Bitcoin EncyclopediaPrefer a book? The Bitcoin Encyclopedia