What is an UTXO?

Aug 8, 2019

This is the explanation I wanted to have read 3 years ago when I didn't understand why everybody was talking about UTXOs and I thought Bitcoin was a big database of accounts. I wrote it for my past know-nothing self.

UTXO means unspent transaction output and is the only form of property in the Bitcoin system. It's what some people call a coin.

That doesn't mean anything if you don't know what a transaction is, but if you know what a transaction is you'll easily get what a transaction output is. Problem solved.


A transaction is a piece of data that takes inputs and produces outputs. Forget about the blockchain thing, Bitcoin is actually just a big tree of transactions. The blockchain is just a way to keep transactions ordered.

Imagine you have 10 satoshis. That means you have them in an unspent transaction output. You want to spend them, so you create a transaction. The transaction should reference unspent outputs as its inputs. Every transaction has an immutable id, so you use that id plus the index of the output (because transactions can have multiple outputs). Then you specify a script that unlocks output and related signatures, then you specify outputs along with a script that locks these outputs.

As you can see, there's this lock/unlocking thing and there are inputs and outputs. Inputs must be unlocked by fulfilling the conditions specified by the person who created the transaction they're in. And outputs must be locked so anyone wanting to spend those outputs will need to unlock them.

For most of the cases locking and unlocking means specifying a public key whose controller (the person who has the corresponding private key) will be able to spend. Other fancy things are possible too, but we can ignore them for now.

Back to the 10 satoshis you want to spend. Since you've successfully referenced 10 satoshis and unlocked them, now you can specify the outputs (this is all done in a single step). You can specify one output of 10 satoshis, two of 5, one of 3 and one of 7, three of 3 and so on. The sum of outputs can't be more than 10. And if the sum of outputs is less than 10 the difference goes to fees. In the first days of Bitcoin you didn't need any fees, but now you do, otherwise your transaction won't be included in any block.

End of the explanation

Now go back and read the first paragraphs again. Hopefully "UTXO" will make more sense.