<p><code>createrawtransaction</code> has an option for <code>data</code>. That will create an OP_RETURN output with whatever hex-encoded data you want in it. So you would have a <code>createrawtransaction</code> command that looks something like this:</p>

<pre><code>createrawtransaction '[]' '{"data":"deadbeef"}'
</code></pre>

CC BY-SA 3.0
2017-07-08T20:11:02.607Z
2017-07-08T20:11:02.607Z
Ava Chow
<p>I want to create a OP_RETURN script on bitcoin core console. Not using GUI, i.e. available on proofofexistence.com , Just as we create raw transaction and then sign it and then broadcast it, I am curious about how to create OP_RETURN script. Anyone here can give reference or want to share their knowledge? Step by step explanation would be much appreciated.</p>

<bitcoind><raw-transaction><op-return>
creating OP_RETURN script on bitcoin core console. i.e. with the help of commands
DOLLY PATWA
# creating OP_RETURN script on bitcoin core console. i.e. with the help of commands

(Asked by: username_0 on 2017-07-08)

I want to create a OP\_RETURN script on bitcoin core console. Not using GUI, i.e. available on proofofexistence.com , Just as we create raw transaction and then sign it and then broadcast it, I am curious about how to create OP\_RETURN script. Anyone here can give reference or want to share their knowledge? Step by step explanation would be much appreciated.

**Tags:** bitcoind, raw-transaction, op-return


---

## 1 answers

### Answer by username_1 on 2017-07-08. Score: 4 | Accepted answer

createrawtransaction has an option for data. That will create an OP_RETURN output with whatever hex-encoded data you want in it. So you would have a createrawtransaction command that looks something like this:
createrawtransaction '[]' '{"data":"deadbeef"}'


---

