← UTXO

Version 1

Nov 29, 2026. Compare with the current version · Version history

An unspent transaction output (UTXO) is a piece of bitcoin value that a transaction has created and that no later transaction has yet spent; a bitcoin balance is the sum of the UTXOs a wallet can spend.[2]

The transaction model

Bitcoin does not keep account balances. Its transactions, as described in the Bitcoin developer documentation, consist of inputs and outputs: each input spends the satoshis paid to a previous output, and each output waits as an unspent transaction output until a later input spends it.[2] The developer guide gives the everyday meaning: when a wallet shows a balance of 10,000 satoshis, that really means 10,000 satoshis waiting in one or more UTXOs.[2] (A satoshi is the smallest unit of bitcoin.)

The 2008 Bitcoin white paper describes the same structure in its section on combining and splitting value. To let value be split and combined, it says, transactions contain multiple inputs and outputs. Normally there is either a single input from a larger previous transaction or several inputs combining smaller amounts, and at most two outputs: one for the payment and one returning the change, if any, to the sender.[1]

Inputs, outputs and outpoints

The developer reference states what each part holds. An output has a value in satoshis and a pubkey script, which "defines the conditions which must be satisfied to spend this output."[3] An input spends an outpoint from a previous transaction. An outpoint has two parts: a 32-byte transaction identifier (TXID) and a 4-byte output index, where the first output is numbered 0.[3] An input also carries a signature script that satisfies the output's conditions, and a sequence number.[3] The documentation does not use the word "UTXO" in this reference page; that an output is unspent when no input has yet pointed at its outpoint follows from how the page describes spending.[3]

Change and fees

An output can be spent only once, and it is spent whole. The developer guide says the full value of the UTXOs included in a transaction must be spent or given to a miner as a transaction fee.[2] When a wallet's chosen UTXOs hold more than the payment needs, the surplus returns to the spender in a change output, which the guide describes as a regular output.[2] The reference adds that the outputs of a transaction may not add up to more than the inputs, except in coinbase transactions, the ones that create new bitcoin as a block reward.[3]

The UTXO set

The collection of all outputs that are currently unspent is called the UTXO set. Bitcoin Core, the reference implementation, reports statistics about it through the gettxoutsetinfo command, which returns the block height, the number of transactions with unspent outputs, the number of unspent outputs (txouts), the estimated size of the chainstate on disk, and optionally a hash of the set.[4] The documentation calls the set's bogosize field "a meaningless metric for UTXO set size."[4] The developer guide notes that a particular kind of output, the null data output, does not have to be stored by full nodes in their UTXO database.[2]

Bitcoin Core also uses a hash of the UTXO set to check a snapshot. Under its AssumeUTXO design, a node can load a snapshot of the set, while a background chainstate validates the chain up to the snapshot's base block; when it gets there, the node hashes the set and confirms it matches a value built into the software.[5]

Sources