Bitcoin's simple, stack-based programming language used to define the conditions under which Bitcoin can be spent. Every Bitcoin transaction contains a script that specifies who can claim the funds and under what circumstances.
Bitcoin's simple, stack-based programming language used to define the conditions under which Bitcoin can be spent. Every Bitcoin transaction contains a script that specifies who can claim the funds and under what circumstances.
Bitcoin Script is a purposefully limited programming language that powers every Bitcoin transaction. When you send Bitcoin, you're not just transferring a balance — you're creating a locking script (scriptPubKey) that defines the conditions required to spend those coins. The recipient must provide an unlocking script (scriptSig) that satisfies those conditions to claim the funds.
Script is intentionally not Turing-complete — it cannot loop, which means scripts always terminate and their execution cost is bounded. This is a deliberate security design choice by Satoshi Nakamoto. While it limits Bitcoin's programmability compared to platforms like Ethereum, it eliminates entire categories of bugs and attacks. The most common script type simply requires a valid digital signature from a specific public key, but more complex scripts enable multisignature wallets, time-locked transactions, and hash-locked contracts.
Despite its simplicity, Script has proven remarkably versatile. Hash Time-Locked Contracts (HTLCs), which power the Lightning Network, are built entirely with Script. Multisig arrangements for corporate treasuries, escrow services, and inheritance planning all use Script's native capabilities. Taproot's MAST extension further expanded what's practical by allowing complex scripts to be compressed and revealed only when needed, keeping the common spending paths cheap and private.
By design. A Turing-complete language can enter infinite loops, making execution costs unpredictable and creating attack surfaces. Bitcoin Script's limitations ensure every script terminates deterministically and has bounded resource usage. This trade-off prioritizes security and predictability over programmability.
Script supports signature verification, time-locks (spending only after a certain block height or time), hash-locks (spending only with a secret preimage), multisig (requiring M-of-N signatures), and combinations thereof. These primitives enable Lightning channels, atomic swaps, escrow arrangements, and inheritance schemes.
No. Wallets abstract away the Script layer entirely. When you send Bitcoin, your wallet automatically constructs the appropriate scripts. Script knowledge is mainly relevant for developers building Bitcoin applications, designing custody solutions, or working on protocol-level improvements.