<p>There's 3 related issues to your question where confusion may be arising.</p>

<ol>
<li>The Blockchain can be used to <em>hash</em> PDFs or JPGs as a means of <a href="http://www.proofofexistence.com" rel="nofollow">proof of existence</a> - this is not the same as attaching the document itself</li>
<li>As seen <a href="http://www.righto.com/2014/02/ascii-bernanke-wikileaks-photographs.html" rel="nofollow">here</a>, it is (was?) possible to take hex code for a PDF/JPEG and use the resulting hex string as a public address. Splitting the file into ?? byte chunks then <a href="http://blockexplorer.com/rawtx/8881a937a437ff6ce83be3a89d77ea88ee12315f37f7ef0dd3742c30eef92dba" rel="nofollow">using these addresses as outputs</a> in a Bitcoin <a href="https://blockchain.info/tx/8881a937a437ff6ce83be3a89d77ea88ee12315f37f7ef0dd3742c30eef92dba" rel="nofollow">transaction</a> allows for things like photos of Nelson Mandela</li>
<li>Coinbase (source of mined coins) allows 100 bytes of arbitrary text in the block which was utilised in the Genesis Block, where encoded in hex (0x5468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73) was the phrase: <em>'The Times 03/Jan/2009 Chancellor on brink of second bailout for banks</em>'. </li>
</ol>

<p>Find more interesting stuff encoded in the Blockchain at <a href="http://bitcoinstrings.com/" rel="nofollow">BitcoinStrings.com</a></p>

CC BY-SA 3.0
2014-09-26T15:18:51.780Z
2014-09-26T15:18:51.780Z
Wizard Of Ozzie
<p>I believe this has been limited to 40 bytes now in Bitcoin Core.</p>

<p>I'm not sure if it was possible to add a pdf, but it is still possible to add text up to the limit. I think the previous limit was 80 bytes.</p>

<p>You do not need to pay any extra to do this and it cannot be done in the client. You have to roll your own transaction.</p>

CC BY-SA 3.0
2014-09-26T10:51:13.717Z
2014-09-26T10:51:13.717Z
T9b
<p>I know that some people had put text, pdf and images in the blockchain.</p>

<p>I wonder which are the limits in order to have a minimum "bytes/btc" value in regarding the blockchain as a permanent database.</p>

<p>How much bytes could I put in a transaction and how many bitcoins I need to use (e.g. in fees) ?</p>

<p>And how this is possible, e.g. using satoshi client?</p>

<blockchain><script><raw-data><database>
How much binary data (bytes) could I put in a transaction and how?
mammadori
# How much binary data (bytes) could I put in a transaction and how?

(Asked by: username_0 on 2014-09-26)

I know that some people had put text, pdf and images in the blockchain.

I wonder which are the limits in order to have a minimum "bytes/btc" value in regarding the blockchain as a permanent database.

How much bytes could I put in a transaction and how many bitcoins I need to use (e.g. in fees) ?

And how this is possible, e.g. using satoshi client?

**Tags:** blockchain, script, raw-data, database


---

## 2 answers

### Answer by username_1 on 2014-09-26. Score: 2 | Accepted answer

There's 3 related issues to your question where confusion may be arising.

1. The Blockchain can be used to *hash* PDFs or JPGs as a means of [proof of existence](http://www.proofofexistence.com) - this is not the same as attaching the document itself
2. As seen [here](http://www.righto.com/2014/02/ascii-bernanke-wikileaks-photographs.html), it is (was?) possible to take hex code for a PDF/JPEG and use the resulting hex string as a public address. Splitting the file into ?? byte chunks then [using these addresses as outputs](http://blockexplorer.com/rawtx/8881a937a437ff6ce83be3a89d77ea88ee12315f37f7ef0dd3742c30eef92dba) in a Bitcoin [transaction](https://blockchain.info/tx/8881a937a437ff6ce83be3a89d77ea88ee12315f37f7ef0dd3742c30eef92dba) allows for things like photos of Nelson Mandela
3. Coinbase (source of mined coins) allows 100 bytes of arbitrary text in the block which was utilised in the Genesis Block, where encoded in hex (0x5468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73) was the phrase: *'The Times 03/Jan/2009 Chancellor on brink of second bailout for banks*'.

Find more interesting stuff encoded in the Blockchain at [BitcoinStrings.com](http://bitcoinstrings.com/)


---

### Answer by username_2 on 2014-09-26. Score: 0

I believe this has been limited to 40 bytes now in Bitcoin Core.

I'm not sure if it was possible to add a pdf, but it is still possible to add text up to the limit. I think the previous limit was 80 bytes.

You do not need to pay any extra to do this and it cannot be done in the client. You have to roll your own transaction.


---

