Learn / Bitcoin

What is OP_RETURN in Bitcoin?

OP_RETURN is a Bitcoin script code that marks an output as unspendable so it can carry data, and Bitcoin Core 30 lifted its long-standing 83-byte relay cap.

Bitcoin Illustration: Cryptoweek

OP_RETURN is a code in Bitcoin's scripting language that marks a transaction output as one that can never be spent. Because nobody can spend it, the output can carry a small block of arbitrary data, such as a hash or a protocol message, without creating a fake coin. How much data nodes will pass along is a policy choice, and that choice became one of Bitcoin's most heated arguments.

What is OP_RETURN in Bitcoin used for?

Every bitcoin output has a locking script, written in Bitcoin Script. An output whose script starts with OP_RETURN is invalid to spend, so any bitcoin sent to it is burned. In practice, most OP_RETURN outputs carry zero bitcoin and exist only to store data.

The Bitcoin Wiki lists uses such as proving ownership of a digital asset and passing extra information needed to make a payment. The Ordinal Theory Handbook says the Runes token protocol, covered in our guide to Ordinals and Runes, stores its messages in an output whose script begins with OP_RETURN.

Why did Bitcoin Core add an OP_RETURN data output?

Before 2014, people stored data by stuffing it into fake addresses. Those outputs looked spendable, so every node had to keep them in its database of unspent coins, its UTXO set, forever.

Bitcoin Core 0.9.0, released March 19, 2014, made OP_RETURN outputs standard so data could go into an output that nodes can safely prune. The release notes stressed this was not an endorsement of storing data on the blockchain, and said keeping non-payment data elsewhere is cheaper and more efficient.

What changed with the OP_RETURN limit in Bitcoin Core 30?

For years Core's default relay policy accepted one OP_RETURN output of up to 83 bytes per transaction. Bitcoin Core 30.0, released October 10, 2025, raised the default datacarriersize to 100,000 bytes. Its release notes say this effectively removes the cap, since transaction size limits are hit first. It also allowed several data outputs in one transaction, with the limit applying to their combined size. Operators can restore the old behavior by setting datacarriersize to 83.

These are relay and mining policy settings, not consensus rules. A block containing a large OP_RETURN output was already valid before version 30.

Why is there an OP_RETURN debate?

Supporters argued the cap no longer worked. The Block reported that users were sending data straight to miners instead, and that the cap pushed some toward methods that bloat the UTXO set. In a June 2025 statement, Core contributors said refusing to relay transactions miners will mine anyway mostly drives users to private channels.

Critics, including Bitcoin Knots maintainer Luke Dashjr, said the change invites spam and turns Bitcoin away from payments. Some node runners turned to Bitcoin Knots, which keeps tighter filters. A proposed soft fork, BIP 110, sought to cap OP_RETURN outputs at 83 bytes for a year as a consensus rule. Its document is now marked closed after a chain split with stalled mining in August 2026, covered in what happens if bitcoin splits.

This guide explains how things work. It is not financial, legal or tax advice. Last updated .