<p>There's several ways this happens in many abstract ways.</p>

<ol>
<li>The <em>coinbase</em> field of a mined block allows for hex data which can hold approximately 1 tweet worth of data.</li>
<li>Multiple outputs can be used for a transaction such that each holds hex data. This would imply <em>dust</em> value outputs (outputs of &lt;5640 satoshis) and would be frowned upon for bloating the Blockchain.</li>
<li>Likewise, as a commenter noted, hex data from a multi-signature transaction could be used to encode information, but has similar implications to #2</li>
<li>Blockchain.info allows for messages which are linked to transactions but are not embedded in the Blockchain.</li>
<li><a href="http://proofofexistence.com" rel="noreferrer">http://proofofexistence.com</a> allows for a hash of a document to be imbedded in the Blockchain to prove an instance of an object (document/file) existed at a certain time.</li>
<li>Similarly to #5, sidechains allow for assets to be linked (though more abstractly) to a time/black in the Blockchain. So if one assumes a block height as a pointer to a sidechain's information, then the Bitcoin blockchain is encoding information/proof of assets</li>
<li>Assuming brute forced Base58Check, it is possible to send Bitcoin to public addresses which could double as hex encoded data, though the assumption of useful messages rests on owning the keys to addresses which have a checksum which appends meaningful data (which is random, hence brute force)</li>
</ol>

CC BY-SA 3.0
2014-11-19T15:52:00.237Z
Could you clarify 6? +1 for the forced Base58Check. I hadn't though of that one yet!
Jori
CC BY-SA 3.0
2014-11-20T04:40:55.497Z
@Jori Sidechains are quite abstract currently, but check http://bitcoin.stackexchange.com/q/32185/9382 and the whitepaper linked therein
Wizard Of Ozzie
CC BY-SA 3.0
2014-11-19T02:18:39.960Z
2014-11-19T09:30:37.627Z
2014-11-19T09:30:37.627Z
Wizard Of Ozzie
<p>The accepted method of doing this is by putting the data in the output script along with op code OP_RETURN which tells clients to mark the transaction as invalid. This way, it doesn't use up as much resources on clients who don't care about non-transaction related data. </p>

<p>There are two schools of thought regarding putting arbitrary data in the blockchain. Some believe that as long as the method used to put arbitrary data in the blockchain follows all the rules of the bitcoin protocol, there is no harm done and that it actually strengthens the network by increasing usage. Others believe that it is detrimental and that these kinds of data should be kept from using up resources on a network that is designed to process transactions and not designed to store arbitrary data.  </p>

<p>In my opinion, it all really comes down to what miners think about these kinds of use of the blockchain and from their perspective , they really don't care. To a miner, it makes no difference what the transaction is as long as it pays a transaction fee ,and they can add it to their block. So I believe that this kind of usage of the blockchain is here to stay. </p>

CC BY-SA 3.0
2014-11-17T17:10:11.290Z
This answer could mention that there are other ways to put data into the blockchain, too, such as using an 1 of 3 raw multisig output, where 1 of the public keys is real and the other 2 are just data. Obviously hacks like this are not recommended, but there's no way for the network to know that the public keys given are not real public keys.
morsecoder
CC BY-SA 3.0
2015-06-15T11:44:42.970Z
also OP_IF, OP_ELSE, OP_ENDIF - one of these clauses can contain arbitrary data [for example](http://blockexplorer.com/rawtx/77822fd6663c665104119cb7635352756dfc50da76a92d417ec1a12c518fad69)
mulllhausen
CC BY-SA 3.0
2014-11-17T17:02:29.723Z
2014-11-17T17:02:29.723Z
k kurokawa
<p><a href="http://digitalcommons.augustana.edu/cscfaculty/1/" rel="nofollow noreferrer">http://digitalcommons.augustana.edu/cscfaculty/1/</a></p>

<p>Academic paper explaining data insertion methods for Bitcoin's blockchain.</p>

CC BY-SA 3.0
2017-07-23T18:32:49.273Z
Please don't give a link-only answer, but summarize the information.
Pieter Wuille
CC BY-SA 3.0
2017-07-22T19:42:52.380Z
2017-07-22T19:42:52.380Z
Math
<p>Yes, I do understand that it is inappropriate to pollute the already large blockchain with data not necessary to make the currency work. But I know people are using Bitcoin as an underlying system for certain applications, like data storage or reaching common consensus about matters not directly related to the currency itself.</p>

<p>What methods are mostly employed to inject the blockchain with arbitrary data (like custom scripts representing data or payouts to addresses that represent data)? Is there a need to stop this in order to prevent an undownloadable large blockchain from forming in the future? If so, how can this be accomplished?</p>

CC BY-SA 4.0
2021-01-10T10:18:00.613Z
Related: https://bitcoin.stackexchange.com/questions/39347/how-to-store-data-on-the-blockchain
Ciro Santilli OurBigBook.com
<blockchain>
What methods are currently used to embed additional data into the Bitcoin blockchain?
Jori
# What methods are currently used to embed additional data into the Bitcoin blockchain?

(Asked by: username_0 on 2014-11-17)

Yes, I do understand that it is inappropriate to pollute the already large blockchain with data not necessary to make the currency work. But I know people are using Bitcoin as an underlying system for certain applications, like data storage or reaching common consensus about matters not directly related to the currency itself.

What methods are mostly employed to inject the blockchain with arbitrary data (like custom scripts representing data or payouts to addresses that represent data)? Is there a need to stop this in order to prevent an undownloadable large blockchain from forming in the future? If so, how can this be accomplished?

**Tags:** blockchain

> **Comments:**
> **username_1**: Related: https://bitcoin.stackexchange.com/questions/39347/how-to-store-data-on-the-blockchain  

---

## 3 answers

### Answer by username_2 on 2014-11-19. Score: 4

There's several ways this happens in many abstract ways.

1. The *coinbase* field of a mined block allows for hex data which can hold approximately 1 tweet worth of data.
2. Multiple outputs can be used for a transaction such that each holds hex data. This would imply *dust* value outputs (outputs of <5640 satoshis) and would be frowned upon for bloating the Blockchain.
3. Likewise, as a commenter noted, hex data from a multi-signature transaction could be used to encode information, but has similar implications to #2
4. Blockchain.info allows for messages which are linked to transactions but are not embedded in the Blockchain.
5. <http://proofofexistence.com> allows for a hash of a document to be imbedded in the Blockchain to prove an instance of an object (document/file) existed at a certain time.
6. Similarly to #5, sidechains allow for assets to be linked (though more abstractly) to a time/black in the Blockchain. So if one assumes a block height as a pointer to a sidechain's information, then the Bitcoin blockchain is encoding information/proof of assets
7. Assuming brute forced Base58Check, it is possible to send Bitcoin to public addresses which could double as hex encoded data, though the assumption of useful messages rests on owning the keys to addresses which have a checksum which appends meaningful data (which is random, hence brute force)

> **Comments:**
> **username_0**: Could you clarify 6? +1 for the forced Base58Check. I hadn't though of that one yet!  
> **username_2**: @username_0 Sidechains are quite abstract currently, but check http://bitcoin.stackexchange.com/q/32185/9382 and the whitepaper linked therein  

---

### Answer by username_3 on 2014-11-17. Score: 4

The accepted method of doing this is by putting the data in the output script along with op code OP\_RETURN which tells clients to mark the transaction as invalid. This way, it doesn't use up as much resources on clients who don't care about non-transaction related data.

There are two schools of thought regarding putting arbitrary data in the blockchain. Some believe that as long as the method used to put arbitrary data in the blockchain follows all the rules of the bitcoin protocol, there is no harm done and that it actually strengthens the network by increasing usage. Others believe that it is detrimental and that these kinds of data should be kept from using up resources on a network that is designed to process transactions and not designed to store arbitrary data.

In my opinion, it all really comes down to what miners think about these kinds of use of the blockchain and from their perspective , they really don't care. To a miner, it makes no difference what the transaction is as long as it pays a transaction fee ,and they can add it to their block. So I believe that this kind of usage of the blockchain is here to stay.

> **Comments:**
> **username_4**: This answer could mention that there are other ways to put data into the blockchain, too, such as using an 1 of 3 raw multisig output, where 1 of the public keys is real and the other 2 are just data. Obviously hacks like this are not recommended, but there's no way for the network to know that the public keys given are not real public keys.  
> **username_5**: also OP_IF, OP_ELSE, OP_ENDIF - one of these clauses can contain arbitrary data [for example](http://blockexplorer.com/rawtx/77822fd6663c665104119cb7635352756dfc50da76a92d417ec1a12c518fad69)  

---

### Answer by username_6 on 2017-07-22. Score: 1

<http://digitalcommons.augustana.edu/cscfaculty/1/>

Academic paper explaining data insertion methods for Bitcoin's blockchain.

> **Comments:**
> **username_7**: Please don't give a link-only answer, but summarize the information.  

---

