Bitcoin Raw Transaction Decoder

Paste raw transaction hex or a PSBT. Every output is turned into an address and amount, input addresses are derived from the unlocking data, and txid, vsize and weight are computed locally.

Signed or unsigned. Decoding runs in your browser; nothing is sent anywhere, so it is safe for unsigned transactions you are about to sign.
Examples:

Decoded in your browser with JavaScript. Addresses are never uploaded or stored.

What is a raw Bitcoin transaction?

A raw Bitcoin transaction is the hex serialization of version, inputs (previous txid and output index, scriptSig, sequence), outputs (value in satoshis and scriptPubKey), optional SegWit witness data and locktime. The txid is the double SHA-256 of the serialization without witness data, and a PSBT (BIP-174) wraps an unsigned transaction with the metadata signers need.

Reading the result

Output script types

TypescriptPubKey patternAddressSpend data
P2PKHOP_DUP OP_HASH160 <20 bytes> OP_EQUALVERIFY OP_CHECKSIG1…scriptSig: signature + public key
P2SHOP_HASH160 <20 bytes> OP_EQUAL3…scriptSig ends with the redeem script
P2WPKHOP_0 <20 bytes>bc1q… (42 chars)witness: signature, public key
P2WSHOP_0 <32 bytes>bc1q… (62 chars)witness ends with the witness script
P2TROP_1 <32 bytes>bc1p…witness: 64-byte signature (key path)
OP_RETURNOP_RETURN <data>none, unspendablen/a

Worked example: weight and vsize

A transaction with one P2WPKH input and two P2WPKH outputs has 113 bytes of non-witness data (version, input, two outputs, locktime) and about 110 bytes of witness data (marker, flag, a 72-byte signature and a 33-byte public key). Weight = 113 × 4 + 110 = 562 weight units, so vsize = ⌈562 ÷ 4⌉ = 141 vbytes. At 10 sat/vB the fee is 1,410 sats. The same payment from a legacy P2PKH input is roughly 226 bytes, all counted at full weight, for 226 vbytes.

Where the raw hex comes from

Bitcoin Core: getrawtransaction <txid> or createrawtransaction. Electrum and Sparrow: export transaction as hex. Explorers: mempool.space and blockstream.info expose /api/tx/<txid>/hex. Hardware wallets show the PSBT they are asked to sign.

Validate an address on its own with the Bitcoin address validator, or inspect bech32 strings with the bech32 decoder.

Frequently asked questions

How is the txid computed?

Double SHA-256 of the transaction serialised without the SegWit marker and witness data, displayed in reverse byte order. The wtxid hashes the full serialisation including witnesses. Both are computed on this page without contacting a node.

Why is an input address missing?

Taproot key-path spends carry only a signature in the witness; the public key is in the output being spent, which is not part of this transaction. Non-standard scripts are also left as raw hex. All other common types (P2PKH, P2SH-wrapped SegWit, native SegWit, multisig redeem scripts) are derived.

What is vsize and why does it matter?

Virtual size is weight ÷ 4, rounded up; fees are quoted per virtual byte. Witness bytes count one quarter, which is why SegWit transactions are cheaper than legacy ones of the same byte length.

Can I decode a PSBT?

Yes. The decoder reads the global map of a PSBT (version 0), extracts the unsigned transaction and decodes it. Partial signatures and other per-input data are not interpreted.

What is RBF and how does the decoder detect it?

Replace-by-fee (BIP-125) lets a sender rebroadcast an unconfirmed transaction with a higher fee. A transaction signals it when at least one input has a sequence number below 0xfffffffe; the decoder reads the sequence of every input and flags the signal.

Does it support Litecoin or testnet?

Choose the network in the dropdown; it only changes the address prefixes (1/3/bc1 → L/M/ltc1 or m/n/2/tb1). The transaction format is identical.