I would like to use Bitcoin core's wallet UI to create a transaction but instead of broadcasting it I would like to get the underlying raw transaction.

Is there a way to do that?

I assume that network sniffing tools might be able to help but I wonder if there is a direct way. I think it would be really useful to have such feature - view raw transaction & confirm before broadcast.

The motivation for this specific scenario is the following - I would like to create a raw transaction on an offline machine running Bitcoin core (with synced blockhain) and broadcast the transaction from another machine.

I am aware that what I am asking for is easily achievable with the CLI but I'd like to use the convenience of a GUI (& fee calculations) and also avoid creating non-intended transactions.

1 Answer 1


1) First you can add connect= to your bitcoin.conf. Your node won't search for other nodes and just try to connect to Since is not a node, your node will have 0 peers.

2) Then you can make the transaction, open the debug console and enter: gettransaction YOURTXID. (or getrawtransaction to get the hex encoded transaction)

3) Then you can close Core, add zapwallettxes=1 to bitcoin.conf and start Core to remove unconfirmed wallet transaction you've made to cancel it.

  • 1
    Thank you. Took me a long time to test it but I can now confirm it works as intended.
    – Jernej
    Commented Jul 17, 2020 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.