TeachMeBitcoin

OP_RETURN Overview

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

OP_RETURN: Arbitrary Data Storage

OP_RETURN is a special Bitcoin opcode that allows users to embed small amounts of metadata directly into the blockchain. Unlike other script types, OP_RETURN outputs are not meant to store money; they are meant to store Information.

1. The Data Carrier

Bitcoin is primarily a financial network, but developers quickly realized that its immutability makes it a perfect place to "Anchor" data.

2. A "Provably Unspendable" Output

When a script starts with OP_RETURN, the Bitcoin Virtual Machine immediately stops execution and marks the script as Invalid.

3. The 80-Byte Standard

To prevent the blockchain from being used as a cheap hard drive (which would bloat the network), a standard "Data Limit" was introduced.

4. The Civil War of Data

The history of OP_RETURN is controversial.

Feature Standard Output (P2PKH) Data Output (OP_RETURN)
Primary Use Storing Value Storing Metadata
Spendable? Yes No (Provably Unspendable)
UTXO Impact Persistent Pruned (None)
Data Limit N/A 80 Bytes

In the next section, we will analyze the 80-Byte Limit in detail.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!