<p>You can, but you shouldn't. Bitcoin transactions should only contain the information needed for the world to verify your transaction. Anything else is essentially private information between the sender and the receiver, and would be useless bloat to the block chain (making it more expensive to maintain for everyone).</p>

<p>That doesn't mean you can't have messages attached to transactions at all, of course. The problem is that there is no easy way to communicate between sender and receiver right now, apart from via the block chain (which works, but as a means of communication it is slow, inefficient, expensive and unreliable). The payment protocol currently being worked on (see <a href="https://gist.github.com/4120476" rel="nofollow">the current draft</a>, or the <a href="http://sourceforge.net/mailarchive/forum.php?thread_name=kb885e%24odv%241@ger.gmane.org&amp;forum_name=bitcoin-development" rel="nofollow">mailing list archives</a>) should solve this very neatly, as it supports transaction metadata that does not become part of the resulting Bitcoin transaction.</p>

CC BY-SA 3.0
2013-01-02T10:29:07.713Z
Thank you for the comments. This is part of my thesis proposal. I'm actually testing using testnet-in-a-box. The purpose of this is to allow linking virtual payment to real life transactions for non-repudiation purposes.
Omar Alriyami
CC BY-SA 3.0
2013-01-01T23:26:17.557Z
2013-01-01T23:26:17.557Z
Pieter Wuille
<p>Yes, you can now store up to 80 bytes via an additional, special output:
<a href="https://bitcoinfoundation.org/blog/?p=290" rel="nofollow">https://bitcoinfoundation.org/blog/?p=290</a></p>

CC BY-SA 3.0
2014-02-18T00:31:19.207Z
2014-02-18T00:31:19.207Z
rdb
<p>You will find that non-standard transactions are very hard to get into the block chain. Instead, encode the additional information as accounts and send a single satoshi to each account needed to convey your message. That way, you can use standard transactions.</p>

<p>Transaction <a href="http://blockexplorer.com/tx/28ccf29cfcc9f82d42793db770e7c7894d61ccf3d18299f34bda2e54415da287">28ccf29cfcc9f82d42793db770e7c7894d61ccf3d18299f34bda2e54415da287</a> is a particularly silly example of this.</p>

CC BY-SA 3.0
2013-01-01T22:44:25.807Z
If you don't want to throw away the coins to phantom addresses you can encode the message in the transferred amount: https://gist.github.com/1625828 . The link is the example for BTCsg (http://btcmsg.com/), but there are other ways.
halftimepad
CC BY-SA 3.0
2012-12-31T21:32:33.607Z
2012-12-31T21:32:33.607Z
David Schwartz
<p>I would like to send transactions with messages as described in the <a href="https://en.bitcoin.it/wiki/Script" rel="nofollow noreferrer" title="wiki">wiki</a>. In <a href="https://bitcoin.stackexchange.com/questions/4486/transaction-with-slightly-changed-script-is-never-relayed">Transaction with slightly changed script is never relayed</a>, someone answered that non-standard transactions are not relaid by the client. I was wondering if this will affect this type of transactions.</p>

<p>Also, I would like to know if there is a source code that implement this functionality. I need to send small data (SHA256) as a digital signature that can be view by all the peers in the network and is associated to this specific transaction.</p>

<p>Thank you very much and your help is very appreciated</p>

<script><java><message><c++>
Can I send message inside the transactions script?
Omar Alriyami
# Can I send message inside the transactions script?

(Asked by: username_0 on 2012-12-31)

I would like to send transactions with messages as described in the [wiki](https://en.bitcoin.it/wiki/Script "wiki"). In [Transaction with slightly changed script is never relayed](https://bitcoin.stackexchange.com/questions/4486/transaction-with-slightly-changed-script-is-never-relayed), someone answered that non-standard transactions are not relaid by the client. I was wondering if this will affect this type of transactions.

Also, I would like to know if there is a source code that implement this functionality. I need to send small data (SHA256) as a digital signature that can be view by all the peers in the network and is associated to this specific transaction.

Thank you very much and your help is very appreciated

**Tags:** script, java, message, c++


---

## 3 answers

### Answer by username_3 on 2012-12-31. Score: 5 | Accepted answer

You will find that non-standard transactions are very hard to get into the block chain. Instead, encode the additional information as accounts and send a single satoshi to each account needed to convey your message. That way, you can use standard transactions.

Transaction [28ccf29cfcc9f82d42793db770e7c7894d61ccf3d18299f34bda2e54415da287](http://blockexplorer.com/tx/28ccf29cfcc9f82d42793db770e7c7894d61ccf3d18299f34bda2e54415da287) is a particularly silly example of this.

> **Comments:**
> **username_4**: If you don't want to throw away the coins to phantom addresses you can encode the message in the transferred amount: https://gist.github.com/1625828 . The link is the example for BTCsg (http://btcmsg.com/), but there are other ways.  

---

### Answer by username_1 on 2013-01-01. Score: 4

You can, but you shouldn't. Bitcoin transactions should only contain the information needed for the world to verify your transaction. Anything else is essentially private information between the sender and the receiver, and would be useless bloat to the block chain (making it more expensive to maintain for everyone).

That doesn't mean you can't have messages attached to transactions at all, of course. The problem is that there is no easy way to communicate between sender and receiver right now, apart from via the block chain (which works, but as a means of communication it is slow, inefficient, expensive and unreliable). The payment protocol currently being worked on (see [the current draft](https://gist.github.com/4120476), or the [mailing list archives](http://sourceforge.net/mailarchive/forum.php?thread_name=kb885e%24odv%241@ger.gmane.org&forum_name=bitcoin-development)) should solve this very neatly, as it supports transaction metadata that does not become part of the resulting Bitcoin transaction.

> **Comments:**
> **username_0**: Thank you for the comments. This is part of my thesis proposal. I'm actually testing using testnet-in-a-box. The purpose of this is to allow linking virtual payment to real life transactions for non-repudiation purposes.  

---

### Answer by username_2 on 2014-02-18. Score: 2

Yes, you can now store up to 80 bytes via an additional, special output:
<https://bitcoinfoundation.org/blog/?p=290>


---

