Library · Crypto, word by word · Inside Bitcoin

What is OP_RETURN?

OP_RETURN is a Bitcoin script command that marks a transaction output as unspendable, so it can carry a small piece of data instead of coins. It writes data such as a hash or a short message into the blockchain without adding an entry to the set of spendable coins every node keeps.

What it means for you

Any bitcoin assigned to an OP_RETURN output can never be spent, so value put there is gone for good. Data written this way is public and permanent once confirmed; it cannot be deleted later.

How it works

A null-data output has a script of OP_RETURN followed by data. Because it is provably unspendable, nodes need not keep it in the database of unspent outputs. The size limit is relay and mining policy, not a consensus rule: Bitcoin Core 0.9 and 0.10 relayed up to 40 bytes and later versions more, and Bitcoin Core 30.0 raised the default -datacarriersize to 100,000, which effectively removes the cap because the maximum transaction size is reached first, and allowed several OP_RETURN outputs per transaction. These outputs are exempt from the dust rule.

Sources: Bitcoin Developer Guide: Transactions (null data), Bitcoin Core 30.0 release notes (data carrier policy) · checked 4 October 2026

Related words

TransactionOrdinalsDustUTXO

Educational content, not financial advice. Written by hand and checked against the source named above. Something wrong? Tell us and we reply within two business days.