Skip to main content

decoderawtransaction RPC Method

Decodes the raw transaction and provides chain information in the form of JSON.

Updated on
Feb 03, 2026

Parameters

hexstring
string
REQUIRED

The transaction hex string

iswitness
boolean

a "true" or "false" value that indicates whether the transaction hex is a serialized witness transaction

Returns

result
object

Decoded transaction object

txid
string

The transaction id

hash
string

The transaction hash (differs from txid for witness transactions)

version
integer

The block version

size
integer

The transaction size

vsize
integer

The virtual transaction size (differs from the size for witness transactions)

weight
integer

The transaction's weight (between vsize4 - 3 and vsize4)

locktime
integer

The transaction locktime

vin
array

A JSON array. Each element in the array serves as a transaction's input vector (vin).

txid
string

(Optional) The transaction id of the output being spent (omitted for coinbase inputs)

vout
integer

(Optional) The output number being spent (omitted for coinbase inputs)

scriptSig
object

(Optional) The input's script signature (omitted for coinbase inputs)

asm
string

The script signature in assembly form

hex
string

The hex-encoded script signature

sequence
integer

The script sequence number

coinbase
string

(Optional) Coinbase data hex (only present on coinbase inputs)

txinwitness
array

(Optional) Hex-encoded witness stack items (present on witness inputs when decoded with witness serialization)

vout
array

A JSON array containing tx information

value
number

The value in BTC

n
integer

The output index

scriptPubKey
object

A JSON object containing information about the PubKey script

asm
string

The script public key in the form of string

desc
string

The inferred descriptor for the output

hex
string

The hex of the script's public key in string format

address
string

The Bitcoin address

type
string

The type of script, e.g. pubkeyhash, multisig

error
object | null

(Optional) JSON-RPC error when the request failed; omitted or null on success

code
integer

Error code

message
string

Error message

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"txid": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
5
"hash": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
6
"version": 1,
7
"size": 225,
8
"vsize": 225,
9
"weight": 900,
10
"locktime": 0,
11
"vin": [
12
{
13
"txid": "e66c029a755d326f14cc32f485ea43e705ef59ed4a8061e8f47e681fbdefefea",
14
"vout": 1,
15
"scriptSig": {
16
"asm": "30440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656[ALL] 03142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab",
17
"hex": "4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab"
18
},
19
"sequence": 4294967295
20
}
21
],
22
"vout": [
23
{
24
"value": 0.4,
25
"n": 0,
26
"scriptPubKey": {
27
"asm": "OP_DUP OP_HASH160 fe7e0711287688b33b9a5c239336c4700db34e63 OP_EQUALVERIFY OP_CHECKSIG",
28
"desc": "addr(1QCdcH34KquWP7TrE6TNpjXHCjcADkNx9i)#c74jvp5y",
29
"hex": "76a914fe7e0711287688b33b9a5c239336c4700db34e6388ac",
30
"address": "1QCdcH34KquWP7TrE6TNpjXHCjcADkNx9i",
31
"type": "pubkeyhash"
32
}
33
},
34
{
35
"value": 48.9998184,
36
"n": 1,
37
"scriptPubKey": {
38
"asm": "OP_DUP OP_HASH160 af92ad98c7f77559f96430dfef2a6805b87b24f8 OP_EQUALVERIFY OP_CHECKSIG",
39
"desc": "addr(1H1LxwmSw6f82AeHcQvNcupXjD9nKqQXLd)#m3zmae6u",
40
"hex": "76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac",
41
"address": "1H1LxwmSw6f82AeHcQvNcupXjD9nKqQXLd",
42
"type": "pubkeyhash"
43
}
44
}
45
]
46
},
47
"id": 1
48
}
1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"txid": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
5
"hash": "0e690d6655767c8b388e7403d13dc9ebe49b68e3bd46248c840544f9da87d1e8",
6
"version": 1,
7
"size": 225,
8
"vsize": 225,
9
"weight": 900,
10
"locktime": 0,
11
"vin": [
12
{
13
"txid": "e66c029a755d326f14cc32f485ea43e705ef59ed4a8061e8f47e681fbdefefea",
14
"vout": 1,
15
"scriptSig": {
16
"asm": "30440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656[ALL] 03142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab",
17
"hex": "4730440220718954e28983c875858b5a0094df4607ce2e7c6e9ffea47f3876792b01755c1202205e2adc7c32ff64aaef6d26045f96181e8741e560b6f3a8ef2f4ffd2892add656012103142355370728640592109c3d2bf5592020a6b9226303c8bc98ab2ebcadf057ab"
18
},
19
"sequence": 4294967295
20
}
21
],
22
"vout": [
23
{
24
"value": 0.4,
25
"n": 0,
26
"scriptPubKey": {
27
"asm": "OP_DUP OP_HASH160 fe7e0711287688b33b9a5c239336c4700db34e63 OP_EQUALVERIFY OP_CHECKSIG",
28
"desc": "addr(1QCdcH34KquWP7TrE6TNpjXHCjcADkNx9i)#c74jvp5y",
29
"hex": "76a914fe7e0711287688b33b9a5c239336c4700db34e6388ac",
30
"address": "1QCdcH34KquWP7TrE6TNpjXHCjcADkNx9i",
31
"type": "pubkeyhash"
32
}
33
},
34
{
35
"value": 48.9998184,
36
"n": 1,
37
"scriptPubKey": {
38
"asm": "OP_DUP OP_HASH160 af92ad98c7f77559f96430dfef2a6805b87b24f8 OP_EQUALVERIFY OP_CHECKSIG",
39
"desc": "addr(1H1LxwmSw6f82AeHcQvNcupXjD9nKqQXLd)#m3zmae6u",
40
"hex": "76a914af92ad98c7f77559f96430dfef2a6805b87b24f888ac",
41
"address": "1H1LxwmSw6f82AeHcQvNcupXjD9nKqQXLd",
42
"type": "pubkeyhash"
43
}
44
}
45
]
46
},
47
"id": 1
48
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free