Interactive Bitcoin UTXO transaction builder and fee calculator
Select one or more UTXOs to use as transaction inputs
Bitcoin transactions use the UTXO (Unspent Transaction Output) model. Unlike traditional banking where you have an account balance, in Bitcoin you own a collection of unspent transaction outputs from previous transactions. To send bitcoin, you consume these outputs as inputs to a new transaction and create new outputs for recipients.
References a previous transaction output (UTXO). You prove ownership by signing with your private key. The output amount is now consumed.
Specifies how much bitcoin goes to which address. This becomes a new UTXO that the recipient can spend (if they have the corresponding private key).
The difference between total input and total output: Fee = Sum(Inputs) - Sum(Outputs). This goes to miners as a reward for including your transaction in a block.
Every bitcoin transaction creates a directed graph. Your "balance" is the sum of all UTXOs you can spend (those locked to your addresses).
Bitcoin uses a "Unspent Transaction Output" model, which is fundamentally different from the account-based model used by banks or Ethereum.
Step 1: Alice sends 1 BTC to Bob. This creates a UTXO at Bob's address (amount: 1 BTC)
Step 2: Bob wants to send 0.7 BTC to Charlie. He must:
| Feature | Account Model (Ethereum) | UTXO Model (Bitcoin) |
|---|---|---|
| Balance | Stored in account state | Sum of unspent outputs |
| Transaction Size | Small (just state change) | Depends on inputs/outputs |
| Privacy | Account linked to all activity | Can use many addresses (privacy) |
| Change Output | ❌ Not needed | ✅ Required (if overspending) |
| Parallelization | Hard (state machine) | ✅ Easy (independent outputs) |
Bitcoin transaction fees are based on transaction size (in bytes), not the amount being sent.
Fee (BTC) = Transaction Size (bytes) × Fee Rate (sats/byte) / 100,000,000
Example:
• Transaction size: 250 bytes
• Fee rate: 50 sats/byte
• Fee = 250 × 50 / 100,000,000 = 0.00125 BTC ≈ $50 USD (at current prices)
Transaction Size Estimation:
• Input: ~148 bytes each
• Output: ~34 bytes each
• Overhead: ~10 bytes
Every Bitcoin transaction has specific structure and components:
Version: 1 Input Count: 2 ├─ Input 1 │ ├─ Previous TXID: a1b2c3d4... │ ├─ Previous Output Index: 0 │ ├─ Script Signature: OP_CHECKSIG... │ └─ Sequence: 0xffffffff └─ Input 2 ├─ Previous TXID: e5f6g7h8... ├─ Previous Output Index: 1 ├─ Script Signature: OP_CHECKSIG... └─ Sequence: 0xffffffff Output Count: 2 ├─ Output 1: 0.7 BTC to 1A1z7agoat... │ └─ Script: OP_DUP OP_HASH160 [...] OP_EQUALVERIFY OP_CHECKSIG └─ Output 2: 0.29 BTC to 3J98t1Wy2u... (change) └─ Script: OP_DUP OP_HASH160 [...] OP_EQUALVERIFY OP_CHECKSIG Locktime: 0
Each input must be signed with the private key of the address that owns the previous output. The signature proves that you authorized the spending of that UTXO without revealing your private key (ECDSA signature).
Scenario: You want to send 0.5 BTC to a friend, but you have these UTXOs:
Available UTXOs:
• UTXO 1: 0.3 BTC (from transaction a1b2...)
• UTXO 2: 0.35 BTC (from transaction c3d4...)
• UTXO 3: 0.2 BTC (from transaction e5f6...)
Your Transaction:
• Use UTXO 1 + UTXO 2 as inputs = 0.65 BTC
• Send 0.5 BTC to friend's address
• Calculate fee: 2 inputs × 148 + 2 outputs × 34 = 364 bytes
• At 50 sats/byte: 364 × 50 / 100,000,000 = 0.00182 BTC fee
• Change back to you: 0.65 - 0.5 - 0.00182 = 0.14818 BTC
Result: 2 inputs, 2 outputs, confirmed in ~10 minutes at standard fee rate
Type these commands in the on-screen console:
tx create - Start building a new transactiontx add [address] [amount] - Add output to transactiontx fee [rate] - Calculate fee with given ratetx verify - Verify transaction validitytx broadcast - Broadcast to networktx reset - Clear current transactionrain effect mining - Trigger mining animation