Script Playground
Build, test, and validate Bitcoin scripts directly in your browser. Create custom-locked transactions or spend from them. All processing happens offline in your browser — your keys never leave your device.
Templates
Scripts
A locking script guards an output — the unlocking script in the spending input must satisfy it. The unlocking script runs first (pushes data), then the locking script evaluates it. Valid if the stack ends with a single TRUE.
Load Scripts from Real Transactions
Paste raw TX hexes to load real scripts. Use the index spinners to pick which output/input to extract. When both TXes are loaded, OP_CHECKSIG-based validation uses the real transaction context (required for P2PKH and R-Puzzle).
Source TX — locking script from output
Spending TX(Spending the output from the tx above) — unlocking script from input
Guards the output. Defines what the spender must prove. Examples: OP_SHA256 <hash> OP_EQUAL (hash puzzle), OP_DUP OP_HASH160 <pkh> OP_EQUALVERIFY OP_CHECKSIG (P2PKH).
Goes into the spending input. Pushes the proof (preimage, signature + pubkey, number, etc.) that satisfies the locking script.
Paste hex script to auto-convert to ASM, or type ASM directly.
Run Validator: Quickly checks if the scripts validate (pass/fail). Step-by-Step: Shows detailed execution trace with stack state after each opcode — perfect for learning how Bitcoin Script works.
Opcode Reference
Common Bitcoin Script opcodes grouped by category. Use these in the ASM editors above.
Need to split UTXOs?
Use the Saibun splitter to create and broadcast UTXO-splitting transactions.