<p>Typically people will store arbitrary data in a separate output in a transaction beginning with <code>OP_RETURN</code>.</p>

<p>Any output with this OP code will be considered <a href="https://en.bitcoin.it/wiki/OP_RETURN" rel="nofollow noreferrer">invalid or provably unspendable</a>, but will still exist as part of the blockchain.</p>

<p>As mentioned in <a href="https://bitcoin.stackexchange.com/a/78579/85140">this thread</a> Bitcoin-core options will allow for up to <code>80 bytes</code> of arbitrary data by default. It is worth noting that <code>80 bytes</code> is simply a default value. Nodes can change the <code>-datacarriersize</code> parameter to manually adjust the limit for the acceptance of larger or smaller amounts of data. For example, <a href="https://www.blockchain.com/btc/tx/d29c9c0e8e4d2a9790922af73f0b8d51f0bd4bb19940d9cf910ead8fbe85bc9b" rel="nofollow noreferrer">this transaction</a> is <code>1155 bytes</code> with <code>983 bytes</code> of arbitrary data and has still been validated into the network.</p>

<p>The <a href="http://www.talkcrypto.org/blog/2016/12/30/op_return-40-to-80-bytes/" rel="nofollow noreferrer">history</a> of the default value is actually quite interesting and has been switched around a <a href="https://github.com/bitcoin/bitcoin/pull/3737" rel="nofollow noreferrer">few</a> <a href="https://github.com/bitcoin/bitcoin/pull/5286" rel="nofollow noreferrer">times</a> throughout Bitcoin's existance.</p>

CC BY-SA 4.0
2018-10-06T06:06:24.973Z
2018-10-06T19:29:51.623Z
2018-10-06T19:29:51.623Z
Mason Ticehurst
<p>Assume that I want to store some arbitrary data on the Bitcoin blockchain via a single transaction. </p>

<p><strong>Question</strong>: Is there any upper bound on the size of data I want to send via a single transaction? </p>

<p>--</p>

<p><em>Edit:</em> I need to know how much "arbitrary data" I can store in the blockchain via a single transaction. Is there any upper bound on the field of the transaction that allows "some arbitrary data" to be stored in it?</p>

CC BY-SA 4.0
2018-10-05T11:51:32.550Z
@RaghavSood Thanks for the link provided. The main difference, here is that I need to know how much "arbitrary data" in the transaction data field I can send to the blockchain.
user153465
CC BY-SA 4.0
2018-10-05T12:13:28.543Z
@user153465 https://bitcoin.stackexchange.com/q/78572/60443
JBaczuk
CC BY-SA 4.0
2018-10-05T12:29:43.820Z
https://bitcoin.stackexchange.com/questions/29554/explanation-of-what-an-op-return-transaction-looks-like
user153465
CC BY-SA 4.0
2018-10-07T18:13:22.333Z
as comment, cause answer section is already closed... I think it is only a duplicate, if within the idea of "OP_RETURN". But the original post didn't ask explicitly for OP_RETURN. Just how to put arbitrary data into the blockchain. One could think of creating a P2SH transaction, which has a script limit of 520 Bytes, and the tx would have many inputs/outputs, up to tx maxsize (https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages).
pebwindkraft
<transactions><transaction-weight>
Upper bound on the Bitcoin transaction size
user153465
# Upper bound on the Bitcoin transaction size

(Asked by: username_0 on 2018-10-05)

Assume that I want to store some arbitrary data on the Bitcoin blockchain via a single transaction.

**Question**: Is there any upper bound on the size of data I want to send via a single transaction?

--

*Edit:* I need to know how much "arbitrary data" I can store in the blockchain via a single transaction. Is there any upper bound on the field of the transaction that allows "some arbitrary data" to be stored in it?

**Tags:** transactions, transaction-weight

> **Comments:**
> **username_0**: @RaghavSood Thanks for the link provided. The main difference, here is that I need to know how much "arbitrary data" in the transaction data field I can send to the blockchain.  
> **username_1**: @username_0 https://bitcoin.stackexchange.com/q/78572/60443  
> **username_0**: https://bitcoin.stackexchange.com/questions/29554/explanation-of-what-an-op-return-transaction-looks-like  
> **username_2**: as comment, cause answer section is already closed... I think it is only a duplicate, if within the idea of "OP_RETURN". But the original post didn't ask explicitly for OP_RETURN. Just how to put arbitrary data into the blockchain. One could think of creating a P2SH transaction, which has a script limit of 520 Bytes, and the tx would have many inputs/outputs, up to tx maxsize (https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages).  

---

## 1 answers

### Answer by username_3 on 2018-10-06. Score: 1

Typically people will store arbitrary data in a separate output in a transaction beginning with `OP_RETURN`.

Any output with this OP code will be considered [invalid or provably unspendable](https://en.bitcoin.it/wiki/OP_RETURN), but will still exist as part of the blockchain.

As mentioned in [this thread](https://bitcoin.stackexchange.com/a/78579/85140) Bitcoin-core options will allow for up to `80 bytes` of arbitrary data by default. It is worth noting that `80 bytes` is simply a default value. Nodes can change the `-datacarriersize` parameter to manually adjust the limit for the acceptance of larger or smaller amounts of data. For example, [this transaction](https://www.blockchain.com/btc/tx/d29c9c0e8e4d2a9790922af73f0b8d51f0bd4bb19940d9cf910ead8fbe85bc9b) is `1155 bytes` with `983 bytes` of arbitrary data and has still been validated into the network.

The [history](http://www.talkcrypto.org/blog/2016/12/30/op_return-40-to-80-bytes/) of the default value is actually quite interesting and has been switched around a [few](https://github.com/bitcoin/bitcoin/pull/3737) [times](https://github.com/bitcoin/bitcoin/pull/5286) throughout Bitcoin's existance.


---

