What Can Bitcoin OP_RETURN Store, and Why Can't It Be Used as Cloud Storage?

 / 
2

OP_RETURN can store very little, and it was never designed for storing files. It is best suited for storing around 32 bytes of hash values, protocol identifiers, or short metadata, used for timestamp proofs or allowing layer-2 protocols to leave anchors on-chain. While it is technically possible to stuff more data into it (especially after Bitcoin Core relaxed its limits), the cost and risks are not worth it: you pay miner fees for every byte, nodes are not required to keep the data long-term, and node operators across the network have no obligation to permanently host your content.

OKX Exchange
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!

What OP_RETURN Can Actually Store

OP_RETURN is a script opcode that immediately terminates script execution when reached, marking the output as provably unspendable. This means any bitcoin placed there is permanently lost (so usually 0 satoshis are used), but it also means this output does not enter the UTXO set and does not create ongoing memory burden for nodes.

Its most common use is storing a hash value. For example, if you want to prove that a certain file existed at a certain point in time, you can compute the file's SHA256 hash (32 bytes) and put that hash into OP_RETURN. Later, anyone who has the original file can recompute the hash and compare it against the on-chain record to confirm that "this file indeed existed before that moment." The file itself does not need to go on-chain; only its fingerprint does.

Beyond that, it is also used to:

  • Leave anchors for layer-2 protocols or sidechains (such as writing state roots or proofs on-chain)
  • Record simple protocol identifiers or version numbers
  • Deliberately destroy small amounts of satoshis in certain designs to mark specific behaviors

One key distinction needs to be clarified: blockchain storage and UTXO storage are two different things. OP_RETURN data is recorded on the blockchain and takes up disk space; but it does not enter the UTXO set, so it does not bloat nodes' in-memory databases. This is exactly why OP_RETURN was designed — before it existed, people used fake addresses to stuff data into spendable outputs, creating massive numbers of "ghost UTXOs" that could never be spent, permanently burdening nodes.

Why It Cannot Be Used as Cloud Storage

First, the cost is disproportionate. Bitcoin block space is auction-based; the miner fee you pay buys byte positions in a block. Storing a 1MB image at current fee rates would cost far more than any commercial cloud storage service. And this fee is not a one-time purchase — you are competing for limited space in that block. If others bid higher, your transaction waits in line.

Second, data is not guaranteed to be permanently retained. Although OP_RETURN outputs are recorded on the blockchain, node software can choose to prune this data. Bitcoin Core's pruning mode allows nodes to keep only the most recent portion of blockchain data. More importantly, full node operators have no protocol-level obligation to permanently store all historical data. What you put in OP_RETURN may no longer have any full copy stored by default-configured nodes after a few years. Entrusting important files to a system where "someone might store it, or no one might" is worse than using a service actually designed for redundant storage.

Third, the rules are changing, and not in the direction of serving cloud storage. Historically, Bitcoin Core's default policy long restricted a single transaction to having only one OP_RETURN with data not exceeding 80 bytes. After policy adjustments in 2025, the default limit was significantly relaxed. Bitcoin Core v30.0 allows OP_RETURN to carry up to 100kB of data and can include multiple OP_RETURN outputs. But this does not mean "cloud storage has been legalized." Adam Back explicitly stated in discussions that OP_RETURN's existence does not constitute an endorsement of on-chain data storage. It is relayed based on nodes' standardness policy, not designed for bulk storage. The relaxation was meant to reduce people using worse methods (fake UTXOs, Taproot inscriptions) to bypass restrictions, not to encourage using Bitcoin as a hard drive.

Fourth, you cannot use the core features of "cloud storage." Cloud storage needs to be searchable, updatable, deletable, and shareable. Data written into OP_RETURN cannot be changed once written. There is no file system, no index, no permission control. To find a specific OP_RETURN data entry, you need to know the transaction ID or block height yourself. Regular users have no usable retrieval interface. This is not a storage service; it is a "bulletin board" for protocol developers.

If You Just Want to Store a Small Proof

Storing a 32-byte hash to prove file existence is a reasonable use of OP_RETURN. But even in this scenario, there are more convenient alternatives. Services like OpenTimestamps aggregate hashes from multiple users into a Merkle tree and write only the tree root into a single Bitcoin transaction, making the on-chain cost per person extremely low. You do not need to construct an OP_RETURN transaction yourself, nor pay a separate miner fee for just a few dozen bytes.

My Judgment

OP_RETURN is positioned as a small data anchor at the protocol layer, not a storage product for end users. A 32-byte hash, an identifier, a state root — these are what it excels at. For data exceeding a few hundred bytes, storing it via OP_RETURN is both expensive and unreliable, and you are fighting against the fee market of the entire Bitcoin network.

If you need long-term file storage, use networks specifically designed for storage like Arweave or Filecoin, or simply use traditional cloud storage with local backups. The strength of the Bitcoin blockchain is tamper-proof timestamp proof, not large-scale data availability. Mixing these two things together will give you a solution that is both expensive and difficult to use.

OKX Exchange
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!

References

  1. Bitcoin Optech·Newsletter #393 (Chinese), accessed: 2026-10-23
  2. BSV Hub·What is OP_RETURN?, accessed: 2026-10-23
  3. GitHub·Mastering Bitcoin 3rd Edition: Data Recording Output (OP_RETURN), accessed: 2026-10-23
  4. Foresight News·Recent OP_RETURN Discussions and Bitcoin Core Node Policy, accessed: 2026-10-23
  5. Blockchain News·Adam Back: Bitcoin OP_RETURN Not an Endorsement of On-Chain Data Storage, accessed: 2026-10-23
  6. Cointelegraph Chinese·Bitcoin Core to Unilaterally Remove Controversial OP_RETURN Limit, accessed: 2026-10-23