<blockquote>
  <p>Can I simply get the size in bytes of the hexadecimal decoded to binary?</p>
</blockquote>

<p>Yes. The hex encodes the raw bytes of the transaction that will be broadcasted throughout the network. Assuming the transaction is fully signed and ready to be broadcasted, the size is the number of bytes, or the length of the string divided by 2. </p>

CC BY-SA 3.0
2015-05-17T01:15:47.047Z
2015-05-17T01:15:47.047Z
morsecoder
<p>Suppose I have a signed hex encoded transaction (as returned by RPC call  signrawtransaction), how to get the size, in bytes, for purpuses of calculating if included transaction fee is acceptable by the official client? Can I simply get the size in bytes of the hexadecimal decoded to binary?</p>

<json-rpc><transaction-fees>
How to calculate the transaction size from the signed hex encoded?
lvella
# How to calculate the transaction size from the signed hex encoded?

(Asked by: username_0 on 2015-05-16)

Suppose I have a signed hex encoded transaction (as returned by RPC call signrawtransaction), how to get the size, in bytes, for purpuses of calculating if included transaction fee is acceptable by the official client? Can I simply get the size in bytes of the hexadecimal decoded to binary?

**Tags:** json-rpc, transaction-fees


---

## 1 answers

### Answer by username_1 on 2015-05-17. Score: 2 | Accepted answer

> Can I simply get the size in bytes of the hexadecimal decoded to binary?

Yes. The hex encodes the raw bytes of the transaction that will be broadcasted throughout the network. Assuming the transaction is fully signed and ready to be broadcasted, the size is the number of bytes, or the length of the string divided by 2.


---

